Weather Nav Snippet

add_shortcode(‘current_weather_nav’, function () { $lat = ‘38.8977’; // Update this to your location $lon = ‘-77.0365’; // Fetch point metadata $meta = wp_remote_get(“https://api.weather.gov/points/{$lat},{$lon}”); if (is_wp_error($meta)) return ”; $meta_data = json_decode(wp_remote_retrieve_body($meta), true); if (empty($meta_data[‘properties’])) return ”; // Get station $station_url =…Continue reading

Redirect URL + /story/

/** * WPCode snippet: Redirect old post URLs https://domain.com/ * to new URLs https://domain.com/stories/ (301) * * – Multisite-safe (runs per-site) * – Only redirects if the old top-level path is a real *post* slug * – Does NOT affect…Continue reading

Membership Details Table Override

/** * Membership Details Table Override * * Child Theme: Storefront-Child-Theme * WC Vendors Membership Template * * Hides certain rows for free plans while keeping table formatting. */ if ( ! defined( ‘ABSPATH’ ) ) { exit; // Exit…Continue reading

[No longer required?] Fix Missing Stripe Credit Card Fields Padding

function deletetransientsfromwc() { delete_transient( ‘wc_stripe_appearance’ ); delete_transient( ‘wc_stripe_blocks_appearance’ ); } add_action( ‘template_redirect’, ‘deletetransientsfromwc’ ); add_filter( ‘wc_stripe_upe_params’, function ( $stripe_params ) { $stripe_params[‘appearance’] = (object) [ ‘rules’ => (object) [ ‘.Input’ => (object) [ ‘padding’ => ’10px’, ] ], ]; return…Continue reading

Elementor LCP Image Preloader (copy)

/** * Elementor LCP Background Image Preloader v2.1 * * Extracts the EXACT URL from Elementor’s _elementor_data JSON * This ensures the preloaded URL matches what Elementor’s CSS requests * * WPCODE SETUP: * – Code Type: PHP Snippet *…Continue reading

Elementor LCP Image Preloader (copy)

/** * Elementor LCP Background Image Preloader v2.1 * * Extracts the EXACT URL from Elementor’s _elementor_data JSON * This ensures the preloaded URL matches what Elementor’s CSS requests * * WPCODE SETUP: * – Code Type: PHP Snippet *…Continue reading