This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Load Elementor styles on all pages in the head to avoid CSS files being loaded in the footer | |
*/ | |
function elementor_css_in_head(){ | |
if(class_exists('\Elementor\Plugin')){ | |
$elementor = \Elementor\Plugin::instance(); | |
$elementor->frontend->enqueue_styles(); | |
} | |
if(class_exists('\ElementorPro\Plugin')){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Replace Home menu item by home icon | |
* | |
* @param $sorted_menu_items | |
* | |
* @return mixed | |
*/ | |
function homeicon_nav_menu_objects( $sorted_menu_items ) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add gift icon the Shop menu item | |
* | |
* @param $sorted_menu_items | |
* | |
* @return mixed | |
*/ | |
function gifticon_nav_menu_objects( $sorted_menu_items ) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Appeler une image de Média de la bibliothèque WordPress, avec l'ID de l'image en question | |
echo wp_get_attachment_image( 18662, 'large', false, ['class' => 'customclass', 'id' => 'customid']); // thumbnail, medium, large, full | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Elementor: Force posts per page number for posts widget on Category Pages | |
* | |
* @param $query | |
*/ | |
function elementor_category_posts_per_page( $query ) { | |
$category_id_or_slug = 'myslug'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Payline : préciser le mode de paiement dans les commandes | |
add_action('manage_shop_order_posts_custom_column', 'payline_payment_mean_admin_column', 10, 2); | |
function payline_payment_mean_admin_column($column) | |
{ | |
global $post; | |
switch ($column) { | |
case 'order_total' : | |
$paymentmean = get_post_meta($post->ID, 'Payment mean', true); | |
if(!empty($paymentmean)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Owlcarousel: default settings for all owlcarousels | |
function custom_owlcarousel_shortcode_atts($defaults){ | |
$args = array( | |
'post_parent' => '' // ID of Page containing images, default is current page ID | |
'order' => 'ASC', // Order | |
'orderby' => 'ID', // Orderby | |
'image_size' => 'large', // Image size: thumbnail, medium, large, full | |
'exclude' => '' // Exclude images by listing their IDs, separate by comma |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'jetpack_sharing_display_text', 'custom_jetpack_sharing_display_text', 10, 2 ); | |
function custom_jetpack_sharing_display_text( $title ){ | |
return ''; | |
} |