/* Shortcode for Gate and Service Road Checklist */ function check_status( $formValue ) { $gateClass = ‘gate-opened’; if ($formValue == ‘Closed’) { $gateClass = ‘gate-closed’; } return “” . $formValue . ““; } function build_gate_service_road_checklist() { $output = ”; $search_criteria…Continue reading
add_filter( ‘get_the_archive_title’, function ( $title ) { if ( is_tag() ) { $title = single_tag_title( ”, false ); // ← just the tag name } return $title; } );Continue reading
function ruki_exclude_children_of_excluded_categories($query) { if ($query->is_home() && $query->is_main_query()) { $excluded = $query->get(‘category__not_in’); // Only proceed if exclusions exist if (!empty($excluded) && is_array($excluded)) { $all_excluded = $excluded; // Loop through each excluded parent to find children foreach ($excluded as $cat_id) { $child_ids…Continue reading
function register_custom_meta_fields() { $fields = [ // Fields that should be of type ‘string’ ‘zip_code’ => ‘string’, ‘city’ => ‘string’, ‘state’ => ‘string’, ‘state_full’ => ‘string’, ‘county’ => ‘string’, ‘best_network’ => ‘string’, // Fields that should be of type ‘number’…Continue reading
/** * Temporarily disables the Reddit embeds. * Leave the shortcode in place so existing pages keep working, * but render nothing until you re-enable it. */ function render_reddit_embeds() { return ”; //Continue reading
/** * [zip_coverage_cards] – show carrier + US Mobile stats for the * current ZIP‑code post. */ function zip_coverage_cards_shortcode() { // ————— Post context ————— $post_id = get_the_ID(); $zip_code = get_post_meta( $post_id, ‘zip_code’, true ); $city_raw = get_post_meta( $post_id, ‘city’, true…Continue reading
/** * Shortcode: [verizon_warp_metrics_cards] * Output two metric cards (Verizon & Warp) whose markup / behaviour matches the * T‑Mobile / US Mobile cards. Requires the companion CSS file. */ function render_verizon_warp_metrics_cards( $atts = [] ) { // ——————————————————————— // Custom‑field helpers…Continue reading
function render_tmobile_lightspeed_metrics_cards($atts) { // Fetch custom fields $custom_fields = get_post_meta(get_the_ID()); // City/state $city = !empty($custom_fields[‘city’][0]) ? $custom_fields[‘city’][0] : ‘Unknown City’; $state = !empty($custom_fields[‘state’][0]) ? $custom_fields[‘state’][0] : ‘Unknown State’; // Helper functions if (!function_exists(‘get_field_value’)) { function get_field_value($fields, $key, $default = 0)…Continue reading
function tmobile_coverage_map_shortcode() { // Get current post ID and required custom fields $post_id = get_the_ID(); $zip_code = get_post_meta($post_id, ‘zip_code’, true); $city = get_post_meta($post_id, ‘city’, true); $state = get_post_meta($post_id, ‘state’, true); // If required fields are missing if (empty($zip_code) || empty($city)…Continue reading
// Shortcode to display Zip Code Coverage Map with Optimized GeoJSON Loading function zip_code_coverage_map_shortcode() { ob_start(); ?>Continue reading