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
| /* Merci à https://www.peeayecreative.com/make-entire-divi-blog-module-items-clickable/ pour l'idée */ | |
| /* Ajoute une position nécessaire aux posts du slider */ | |
| .et_pb_post_slider .et_pb_slides { | |
| position: relative; | |
| } | |
| /* Étend le lien du titre sur tout le post */ | |
| .et_pb_post_slider .et_pb_slides .et_pb_slide_title a:after { | |
| position: absolute; | |
| display: block; |
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
| // Supprimer le bouton "Ajouter au panier" et ajouter un bouton "Contactez-nous" uniquement pour certains produits | |
| add_action('wp', 'conditionally_replace_add_to_cart_button'); | |
| function conditionally_replace_add_to_cart_button() { | |
| $product_ids = array(123, 456); // Remplacez 123 et 456 par les IDs de vos produits spécifiques | |
| if (is_product() && in_array(get_the_ID(), $product_ids)) { | |
| remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30); | |
| add_action('woocommerce_single_product_summary', 'custom_contact_button_single', 30); | |
| } |
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
| // Supprimer le bouton "Ajouter au panier" sur la page produit et ajouter un bouton de contact | |
| remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30); | |
| add_action('woocommerce_single_product_summary', 'custom_contact_button_single', 30); | |
| function custom_contact_button_single() { | |
| $contact_page_url = get_permalink( get_page_by_path( 'contact' ) ); // ici le slug de la page de contact est "contact" modifiez-le avec votre slug | |
| echo '<a href="' . esc_url($contact_page_url) . '" class="button contact-button">' . __('Contactez-nous', 'woocommerce') . '</a>'; | |
| } |
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
| /** | |
| * Supprime "noreferrer" des liens WordPress ouverts dans un nouvel onglet. | |
| * Conserve "noopener" pour la sécurité. | |
| */ | |
| add_filter('wp_targeted_link_rel', function ($rel, $link) { | |
| // Retire uniquement "noreferrer" de la chaîne | |
| if (strpos($rel, 'noreferrer') !== false) { | |
| $rel = str_replace('noreferrer', '', $rel); | |
| } |
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
| RewriteEngine On | |
| # Ne pas rediriger les challenges Let's Encrypt ni le robots.txt | |
| RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/ [OR] | |
| RewriteCond %{REQUEST_URI} ^/robots\.txt$ | |
| RewriteRule ^ - [L] | |
| # Rediriger tout le domaine vers le nouveau | |
| RewriteCond %{HTTP_HOST} ^(www\.)?ancien-domaine\.fr$ [NC] | |
| RewriteRule ^ https://www.nouveau-domaine.fr/ [R=301,L] |
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
| Etes vous d'accord ?<span class="asterisk">*</span> | |
| [select* your_redirect_page include_blank "Oui" "Non"] |
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
| /** | |
| * Contact form7 fonction de redirection | |
| * A ajouter à votre fichier function.php de votre thème enfant | |
| */ | |
| function cf7_redirectionl() { | |
| ?> | |
| <script type="text/javascript" id="cf7-redirection"> | |
| document.addEventListener( 'wpcf7mailsent', function( event ) { | |
| // changer l'ID par votre ID de formulaire de contact | |
| // ID visible dans le lien vers votre formulaire dans l'adrministration |
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
| // Exemple de code pour utiliser Really Simple Captcha avec CF7 | |
| [captchac captcha-1 size:m fg:#363636 bg:#ffffff] [captchar captcha-1 watermark "Recopiez le code ici"] |
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
| // exemple de code à insérer dans vos formulaires CF7 afin d'utiliser Akismet | |
| [text* your-name akismet:author watermark "Nom et Prénom"] | |
| [email* your-email akismet:author_email watermark "Adresse Email"] |
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 | |
| // Merci à Garconis : https://gist.github.com/Garconis/34b6be24ee644c024663ef1d2e11e2bb | |
| // Supprime extra_add_viewport_meta du wp_head | |
| function remove_extra_actions() { | |
| remove_action( 'wp_head', 'extra_add_viewport_meta' ); | |
| } | |
| // Appel de 'remove_divi_actions' pendant l'initialisation de WP | |
| add_action('init','remove_extra_actions'); | |
| // Ajout du nouveau pinch et zoom avec le maximum-scale à 5 |
NewerOlder