Location: site_wide_header
VERY IMPORTANT – Updates Express Checkout Elements
const update_apple_pay_button = () => { let target_container = jQuery( ‘.eh_payapal_express_checkout_button’ ); let target_button = jQuery( ‘.apple-pay-button’ ); if ( target_container.length == 0 || target_button.length == 0 ) { return; } target_button = target_button.clone( true ); let current_button_style = target_button.attr(…Continue reading
Auto-Launches quizz
jQuery( document ).ready(() => { let hash = window.location.hash; let contains_hash = ( hash == ‘#quiz’ ); if ( contains_hash ) { Marquiz.showModal( ’62a10a9ab692e000277a518a’ ); } });Continue reading
Adds Klaviyo form to footer
jQuery( document ).ready(() => { let p_element = jQuery( “p:contains(‘At Terra Health Essentials, we believe that prevention is key and are committed to empowering people to take control of their health by educating them about optimal gut function and improving…Continue reading
Frontend – Remove WooCommerce Mini Cart
const removeWCMC = () => { let current_url = window.location.href.toLowerCase(); if ( !current_url.includes( “/checkout” ) ) { return; } let mini_cart = jQuery( “.woocommerce-mini-cart” ); if ( mini_cart.length == 0 ) { return; } let inner_container = mini_cart.closest( “.gm-inner” );…Continue reading
Quiz Button
(function(w, d, s, o){ var j = d.createElement(s); j.async = true; j.src = ‘//script.marquiz.io/v2.js’;j.onload = function() { if (document.readyState !== ‘loading’) Marquiz.init(o); else document.addEventListener(“DOMContentLoaded”, function() { Marquiz.init(o); }); }; d.head.insertBefore(j, d.head.firstElementChild); })(window, document, ‘script’, { host: ‘//quiz.marquiz.io’, region: ‘us’, id:…Continue reading
Tasty Recipes – Change star rating size and spacing
/* change increase or decrease .97 to change star size, change 0.5 to change spacing */ .tasty-recipes, .tasty-recipes-ratings { –tr-star-size: .97em!important; –tr-star-margin: 0.5em!important; }Continue reading
Change rating tooltip colors
/* change #000 in both places below to change the background, change #FFF to change the text color, change #F7D578 to change the link color */ .tasty-recipes-static-tooltip { background-color:#000 !important; color:#FFF !important; } .tasty-recipes-static-tooltip:after { border-top-color:#000 !important; } a.tasty-recipes-scrollto {…Continue reading
Remove unused JS // functions.php
function remove_unused_js() { // Globale Variable für die wp_enqueue_scripts-Aktion global $wp_scripts; // Array mit Dateinamen ungenutzter JS-Dateien $unused_js = array( ‘jquery-migrate.min.js’, // Beispiel ); // Durchlaufen aller registrierten Skripte foreach ( $wp_scripts->registered as $handle => $script ) { // Wenn…Continue reading
Header end footer
/* Style the footer container */ #custom-footer { background-color: #fff; /* White background */ padding: 1px; width: 1200px; max-width: 90%; margin: 0 auto; }Continue reading