Exclude Common Scripts from SiteGround Speed Optimizer JS Minification

add_filter( ‘sgo_js_minify_exclude’, ‘js_minify_exclude’ ); function js_minify_exclude( $exclude_list ) { // Required as of WC Stripe Gateway v10.8.4 due to JS conflict on certain machines (Windows 11 conflict confirmed) $exclude_list[] = ‘wc-stripe-upe-classic’; // For classic/shortcode checkout $exclude_list[] = ‘wc-stripe-blocks-integration’; // For…Continue reading

zVideo Background (testing)

// Shortcode to display video in background of element // Example: [idxjarallax height=”50vh” video_source=”https://player.vimeo.com/video/791389345?h=f99fa401c1&autoplay=1&loop=1&title=0&byline=0&portrait=0&background=1&dnt=1″ image_source=”https://napa.idxcentral.net/wp-content/uploads/2024/03/banner-e.jpg”] function jarallax_shortcode($atts) { $atts = shortcode_atts(array( ‘height’ => ‘100vh’, ‘video_source’ => ‘https://player.vimeo.com/video/791389345?h=f99fa401c1&autoplay=1&loop=1&title=0&byline=0&portrait=0&background=1&dnt=1’, ‘image_source’ => ‘https://napa.idxcentral.net/wp-content/uploads/2024/03/banner-e.jpg’ ), $atts, ‘idxjarallax’); $height = esc_attr($atts[‘height’]); $video_source = esc_url($atts[‘video_source’]); $image_source…Continue reading

Specify Query Parameters to Ignore during SiteGround Speed Optimizer Cache-Creation and Cache-Spawn

add_filter( ‘sgo_ignored_query_params’, ‘add_sgo_ignored_query_params’); function add_sgo_ignored_query_params( $ignored_query_params ) { // List query parameters to ignore in addition to SiteGround Speed Optimizer default ignore-list. // WooCommerce Order-Received Redirection Order Attribution $ignored_query_params[] = ‘utm_nooverride’; // Third-Party or Plugin-Specific Parameters // MailChimp $ignored_query_params[] =…Continue reading

TinyMCE HTML Editor Customizations

add_filter( ‘wp_kses_allowed_html’, function( $tags, $context ) { if ( ‘post’ !== $context ) { return $tags; } // Make sure dl/dt/dd are present (usually already are). foreach ( array( ‘dl’, ‘dt’, ‘dd’ ) as $tag ) { if ( !…Continue reading

Mythos Shortcodes PHP

/** * Mythos — centralized Nav / Footer / Modal shortcodes * WPCode -> Add Snippet -> PHP Snippet -> Auto Insert, Run Everywhere -> Activate. * * Two logo images: an ICON (symbol) and a WORDMARK (the “Mythos Technology…Continue reading

DATABANK META GRID

function pj_databank_meta_grid() { if (!is_single()) return ”; return ‘ Category: Databank Entry Source: Popcorn Jedi Status: Active Transmission ‘; } add_filter(‘post_thumbnail_html’, function($html) { if (is_single()) { return $html . pj_databank_meta_grid(); } return $html; });Continue reading

Databank Breadcrumbs

function pj_databank_breadcrumbs() { if (!is_single()) return; echo ‘ Path: Popcorn Jedi / Databank ‘; } add_action(‘loop_start’, ‘pj_databank_breadcrumbs’, 20);Continue reading

Single product – Custom label

/** * ACF-productlabel tonen. */ function ld_product_label() { if (!function_exists(‘get_field’)) { return; } global $product; if (!$product instanceof WC_Product) { return; } $label_text = get_field(‘label_tekst’, $product->get_id()); $kleur = get_field(‘achtergrondkleur’, $product->get_id()); if (!$label_text) { return; } if (!$kleur) { $kleur =…Continue reading