Hi,
I’m building a multilingual site (25 languages) using URL prefixes (/fr/, /de/, /es/, etc.) WITHOUT using WPML or Polylang plugins.
Current Setup
1 WordPress site with custom routing via .htaccess
Footer loaded via Static Blocks (Elementor templates)
All 25 footer static blocks are ALREADY created and translated:
EN (default): Static Block ID 66718
FR: Static Block ID 66717
DE: Static Block ID 66716
ES: Static Block ID 66715
IT: Static Block ID 66714
… (all 25 languages ready)
Each footer contains translated text, links, and widgets.
How XStore Currently Loads Footer
Looking at the database, XStore stores the footer configuration in the et_multiple_headers option with this structure:
json
{
“footer”: {
“id”: 66718,
“content_type”: “static_block”,
“sections”: []
}
}
This hardcodes the English footer (66718) for the entire site.
The Problem
ALL languages display the English footer (ID 66718) because it’s configured in Theme Options → Header Builder → Footer.
When a user visits:
posterworldwide.com/product/ → Shows footer 66718 ✅ (correct)
posterworldwide.com/fr/produit/ → Shows footer 66718 ❌ (should be 66717)
posterworldwide.com/de/produkt/ → Shows footer 66718 ❌ (should be 66716)
What I Need
How can I dynamically change which footer Static Block is loaded based on the current language URL?
Desired behavior:
text
URL prefix → Footer Static Block ID
———————————–
/ → 66718 (EN)
/fr/ → 66717 (FR)
/de/ → 66716 (DE)
/es/ → 66715 (ES)
… (25 total)
What I’ve Tried
1. Output Buffer HTML Replacement (doesn’t work – footer doesn’t render):
php
add_action(‘template_redirect’, function() {
ob_start(function($html) {
// Replace data-elementor-id=”66718″ with “66717” for FR
return str_replace(‘elementor-66718’, ‘elementor-66717’, $html);
});
}, 1);
→ Changes the HTML ID but footer content doesn’t display
2. Elementor Widget Hook (only affects widgets INSIDE footer):
php
add_action(‘elementor/frontend/widget/before_render’, function($widget) {
// This only works for individual widgets, not the footer template itself
});
3. Trying to filter et_get_option (doesn’t work):
php
add_filter(‘theme_mod_footer’, function($footer) {
$footer[‘id’] = 66717; // Try to change footer ID
return $footer;
});
→ No effect
Questions for XStore Support
Which specific XStore filter/hook controls the footer Static Block ID selection?
Can I intercept et_get_option(‘footer’) to dynamically change the ID before it’s loaded?
Does XStore cache the et_multiple_headers option? If yes, how can I bypass it per request?
Is there a recommended way to load different footer Static Blocks per language WITHOUT WPML?
Should I modify the database option dynamically, or is there a cleaner filter-based approach?
My Footer Mapping (ready to implement)
php
$footer_map = array(
‘en’ => 66718,
‘fr’ => 66717,
‘de’ => 66716,
‘es’ => 66715,
‘it’ => 66714,
// … 25 languages total
);
$current_lang = ‘fr’; // Detected from URL
$footer_id = $footer_map[$current_lang];
// HOW DO I TELL XSTORE TO LOAD THIS FOOTER ID?
Technical Details
XStore Theme Version: [insert your version]
WordPress: 6.4+
Elementor Pro: [insert your version]
Server: PHP 8.1+
Custom multilingual routing via mu-plugin (NO WPML/Polylang)
All footer Static Blocks are already created, translated, and working individually. I just need to know how to tell XStore to load the correct one based on the URL language prefix.
Regards