zooming to user’s location

document.addEventListener(‘DOMContentLoaded’, function() { // 1. Find all images within the WPForms View const itemImages = document.querySelectorAll(‘.wpforms-view-entry img’); itemImages.forEach(img => { img.style.cursor = ‘pointer’; // Make it look clickable img.addEventListener(‘click’, function() { // 2. Find the postcode text near the map…Continue reading

Post term count

add_shortcode( ‘term_count’, function( $atts ) { $atts = shortcode_atts( array( ‘taxonomy’ => ”, ‘hide_empty’ => ‘false’, ), $atts, ‘term_count’ ); $taxonomy = sanitize_key( $atts[‘taxonomy’] ); if ( ! $taxonomy || ! taxonomy_exists( $taxonomy ) ) { return ‘0’; } $terms…Continue reading

Huttons News Importer

final class Huttons_News_Importer { private const CRON_HOOK = ‘huttons_news_hourly’; private const CATALOG_URL = ‘https://www.huttonsgroup.com/property-news’; private const MINIMUM_DATE = ‘2026-01-01’; private const POST_TYPE = ‘insight’; private const SOURCE_META = ‘source’; private const ARTICLE_ID_META = ‘_huttons_article_id’; private const LOCK_KEY = ‘huttons_news_import_lock’; public…Continue reading

Days of the Week Filter Fix (Events List Block)

// 1) Send the checked “Days of the Week” values to the server – the block’s // own JS never does this, it only masks already-loaded events with them. add_action( ‘wp_enqueue_scripts’, function () { if ( ! wp_script_is( ‘sc-frontend-blocks-event-list-js’, ‘registered’…Continue reading