HTML Sitemap Archive Pages

/** * Enhances AIOSEO HTML Sitemap: * – Links CPT headings to their archive URLs (including Blog) * – Moves the “Posts” section right after “Pages” * – Preserves all AIOSEO settings, filters, and structure * * Fixed bugs: *…Continue reading

Email- Simulateur statuts php

add_action(‘wp_ajax_telecharger_pdf_statuts’, ‘mfstatuts_dl_pdf’); add_action(‘wp_ajax_nopriv_telecharger_pdf_statuts’, ‘mfstatuts_dl_pdf’); add_action(‘wp_ajax_envoyer_simulation_email’, ‘mfstatuts_send_mail’); add_action(‘wp_ajax_nopriv_envoyer_simulation_email’, ‘mfstatuts_send_mail’); function mfstatuts_get_taux() { return array( ‘ae’ => array( ‘services’ => array(‘taux’ => 0.218, ‘acre’ => 0.109, ‘abat’ => 0.50, ‘plaf’ => 77700), ‘commerciale’ => array(‘taux’ => 0.128, ‘acre’ => 0.064, ‘abat’ =>…Continue reading

weather functionality

add_shortcode(‘nws_weather’, function () { $lat = ‘38.8977’; $lon = ‘-77.0365’; // Fetch NWS data $meta = wp_remote_get(“https://api.weather.gov/points/{$lat},{$lon}”); if (is_wp_error($meta)) return ‘Weather unavailable.’; $meta_data = json_decode(wp_remote_retrieve_body($meta), true); if (!$meta_data || empty($meta_data[‘properties’])) return ‘Invalid location.’; $forecast_url = $meta_data[‘properties’][‘forecast’]; $zone = basename($meta_data[‘properties’][‘forecastZone’]); $station_url…Continue reading

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