/* Shortcode for Gate and Service Road Checklist */

/* 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

Register Blog Post Custom Fields

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

Reddit Embed

/** * 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

[Best] Coverage Cards

/** * [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

Network Metrics Cards [Verizon]

/** * 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

[T-Mobile]Network Metric Cards

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

[AT&T] Coverage Map

// Shortcode to display Zip Code Coverage Map with Optimized GeoJSON Loading (Lazy-Loaded) function att_coverage_map_shortcode() { // Retrieve current post ID and its custom ‘zip_code’ $post_id = get_the_ID(); $zip_code = get_post_meta($post_id, ‘zip_code’, true); $avg_dl = get_post_meta($post_id, ‘att_mean_download_kbps’, true); $avg_dl_formatted =…Continue reading

[Verizon] Coverage Map

// Shortcode to display Zip Code Coverage Map with Optimized GeoJSON Loading (Lazy-Loaded) function verizon_coverage_map_shortcode() { // Retrieve current post ID and its custom ‘zip_code’ $post_id = get_the_ID(); $zip_code = get_post_meta($post_id, ‘zip_code’, true); $avg_dl = get_post_meta($post_id, ‘verizon_mean_download_kbps’, true); $avg_dl_formatted =…Continue reading

Nearby Stores Maps

function generate_map_of_nearby_stores() { // Get current post ID $post_id = get_the_ID(); // Retrieve the zip code, city, and state from custom fields $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…Continue reading