TEMP Sideload Guard — remove when pg-display ships (BACKLOG #45)

/** * PG Sideload Guard — TEMPORARY. Installed 2026-09-15. * * ══════════════════════════════════════════════════════════════════════ * THIS IS A TOURNIQUET. IT IS MEANT TO BE DEACTIVATED. * ══════════════════════════════════════════════════════════════════════ * * WHAT IT DOES: blocks front-end HTTP requests for image files. Nothing else. *…Continue reading

Remove Optional Script

remove_action( ‘wp_footer’, ‘wpcomsh_footer_rum_js’ ); // remove frontend // remove_action( ‘admin_footer’, ‘wpcomsh_footer_rum_js’ ); // remove backendContinue reading

Set Banner BG Color

add_action( ‘wp_head’, function() { if ( is_singular() ) { $banner_color = get_post_meta( get_the_ID(), ‘banner_color’, true ); if ( $banner_color ) { echo ‘ ‘; } } });Continue reading

GTranslate language switch – PROD LIBRARY

/* * Snippet #113: GTranslate language switch — auto reload * * GTranslate with url_structure=none sets the googtrans cookie client-side but * does not trigger a page reload. This means PHP-rendered content (e.g. the LTL * banner PDF link) and…Continue reading

Scroll Progress Bar

add_action(‘wp_body_open’, function() { echo ‘ ‘; }); add_action(‘wp_head’, function() { echo ‘ ‘; }); add_action(‘wp_footer’, function() { echo ‘‘; });Continue reading

[Hunters Hill Trust] House Count Dynamic Data Shortcode

function rd_greenbook_house_count_shortcode() { $counts = wp_count_posts( ‘wpsl_stores’ ); return isset( $counts->publish ) ? esc_html( number_format_i18n( (int) $counts->publish ) ) : ‘0’; } add_shortcode( ‘rd_greenbook_house_count’, ‘rd_greenbook_house_count_shortcode’ );Continue reading

Next and Previous MLL Post

add_filter( ‘etch/dynamic_data/post’, function( $data, $post_id ) { $prev = get_previous_post(); $next = get_next_post(); $image_size = ‘medium’; $data[‘prev_post’] = $prev ? [ ‘title’ => html_entity_decode( get_the_title( $prev ), ENT_QUOTES, ‘UTF-8’ ), ‘permalink’ => get_permalink( $prev ), ‘thumbnail’ => get_the_post_thumbnail_url( $prev->ID, $image_size…Continue reading