Custom Separator

function getSeparator() { return window.location.href.includes(‘?’) ? ‘&’ : ‘?’; } document.addEventListener(‘om.Dtr.init’, function (event) { const separator = getSeparator(); event.detail.Dtr.setCustomVariable(‘separator’, separator); });Continue reading

Make Sponsor ID a Meta Tag

/* on category pages, grabbing the sponsorship_id is the last post included in the list – not the category’s sponsor id. * this code deals with this…borrowed from equinenetwork-gam-public-footer.php */ $term = get_queried_object(); if ( function_exists(‘get_field’) == true && get_field(‘sponlineitemid’)…Continue reading

cmplz_show_banner_on_click

function addEvent(event, selector, callback, context) { document.addEventListener(event, e => { if ( e.target.closest(selector) ) { callback(e); } }); } addEvent(‘click’, ‘.cmplz-show-banner’, function(){ document.querySelectorAll(‘.cmplz-manage-consent’).forEach(obj => { obj.click(); }); });Continue reading

TranslatePress Shortcode Styler MINIMAL

/* Grundlegende Anpassungen für den Sprachumschalter */ .trp-language-switcher { all: unset !important; display: inline-block !important; position: relative !important; /* Verhindert Verschiebungen */ } /* Entfernt alle Padding-, Margin- und Rahmenwerte */ .trp-language-switcher a { all: unset !important; display: inline-block !important;…Continue reading