Archives: Snippets
Remove Clear Link @ Variable Single Product Page
add_filter( ‘woocommerce_reset_variations_link’, ‘__return_empty_string’, 9999 );Continue reading
ASA
function generate_student_number( $user_id ) { // Generate a unique student number, e.g., STU + random 6 digits $student_number = ‘STU-‘ . strtoupper( wp_generate_password( 6, false ) ); // Save the student number to user meta update_user_meta( $user_id, ‘student_number’, $student_number );…Continue reading
Replace Special Characters in Post Title
var myInterval = setInterval(checkForJquery, 50); function checkForJquery() { if (window.jQuery) { clearInterval(myInterval); fixPageTitles(); } } function fixPageTitles() { /* find the page title */ var originalString = jQuery(‘h1.elementor-heading-title.elementor-size-default’).text(); /* replace raw special characters with the proper HTML entity */ if…Continue reading
Check URL for Braze UUID
if(isset($_GET[‘uuid’])) { $braze_uuid = $_GET[‘uuid’]; } if (!empty($braze_uuid)) echo ” “;Continue reading
Editorial Group GTM Head Tag
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’: new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src= ‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f); })(window,document,’script’,’dataLayer’,’GTM-PS5CP37N’);Continue reading
Editorial Group GTM Body Tag
slide-left-center.css
html div#om-{{id}} { left: 0 !important; height: 540px !important; top: calc(540px / 2) !important; bottom: calc(540px / 2) !important; margin-top: auto !important; margin-bottom: auto !important; animation: 1s ease-out 0s 1 slideInFromLeft; } @keyframes slideInFromLeft { 0% { transform: translateX(-100%); }…Continue reading
slide-right-center.css
html div#om-{{id}} { margin-right: -20px !important; height: 540px !important; top: calc(540px / 2) !important; bottom: calc(540px / 2) !important; margin-top: auto !important; margin-bottom: auto !important; animation: 1s ease-out 0s 1 slideInFromRight; } @keyframes slideInFromRight { 0% { transform: translateX(100%); }…Continue reading
slide-top-left.css
html div#om-{{id}} { top: 0px !important; bottom: unset !important; right: auto !important; margin-left: 20px !important; transition: top 0.3s ease 0s !important; }Continue reading