Hi XStore Support Team,
Context
Site: test1.tellescode.com (i’m usign this test page copy of the oficial lacajamagicatoys.com in order to not broke my site)
Theme: XStore [version] (Child theme active)
WordPress: [version]
WooCommerce: [version]
SEO plugin: [Yoast / Rank Math + version]
Filters plugin: Filter Everything Pro [version]
Template builder on the shop/archive: Elementor
Goal
On WooCommerce archive pages with active filters generated by Filter Everything Pro (via its SEO Rules), I want to display:
The H1/Title defined by Filter Everything Pro’s SEO Rule
The SEO Description (long text) from that Rule, under the H1
In
, theExample
Filter combination: Product Category = “Juegos de mesa” + Attribute (Age) = “5 años”
Test URL: https://test1.tellescode.com/shop/producto-de-mesa/edad-5-a-6-anos/
Expected visible H1: “Juegos de mesa para niños de 5 años”
Expected visible description: the SEO Description configured in the Rule
Expected in
:What happens now with XStore
The archive view still prints the “Shop” page title from the theme, instead of the H1 provided by Filter Everything Pro.
The archive description (which normally appears via woocommerce_archive_description and does show on “normal” product category pages) does not appear on these filtered/Rule pages.
Filter Everything Pro correctly generates the URL and I can force
What I already tried
Disabling “Show Page Title” for shop/categories in Theme Options (to avoid the default “Shop” H1).
Moving Filter Everything Pro’s output to woocommerce_archive_description so it appears under the breadcrumb.
Preventing duplicates by removing the plugin’s default woocommerce_after_shop_loop description output.
Clearing all caches and re-saving permalinks.
Documentation followed
We implemented the approach described here, but it seems not to work as expected with XStore:
https://filtereverything.pro/resources/all-about-seo/
Questions
How can we correctly display the title (H1), meta title, description, and meta description from Filter Everything Pro’s SEO Rule on these archive pages in XStore’s page heading area?
Current snippet I’m using (works in other themes, but on XStore the H1/Description do not appear in the page heading area):
// === Filter Everything Pro + XStore ===
if ( ! function_exists('fepro_get_seo_service') ) {
function fepro_get_seo_service() {
if ( class_exists('\FilterEverything\Filter\Container') ) {
try {
return \FilterEverything\Filter\Container::instance()->getSeoFrontendService();
} catch (\Throwable $e) { return null; }
}
return null;
}
}
// 1) Mover H1 + Descripción al encabezado del archivo
add_action('woocommerce_archive_description', function () {
$srv = fepro_get_seo_service();
if ( ! $srv ) return;
// H1 desde la Regla SEO
if ( method_exists($srv, 'seoH1') ) {
$h1 = $srv->seoH1('');
if ( $h1 ) {
echo '<h1 class="fe-seo-h1" style="margin:.5rem 0 0;">' . esc_html($h1) . '</h1>';
}
}
// Descripción SEO (capturamos la salida para reubicarla aquí)
if ( method_exists($srv, 'showSeoDescription') ) {
ob_start();
$srv->showSeoDescription();
$desc = trim(ob_get_clean());
if ( $desc !== '' ) {
echo '<div class="fe-seo-description" style="margin:.5rem 0 1rem;">' . $desc . '</div>';
}
}
}, 7); // 7 = queda arriba, debajo del breadcrumb
// 2) Evitar duplicado al final del loop
add_action('wp', function () {
$srv = fepro_get_seo_service();
if ( $srv ) {
remove_action('woocommerce_after_shop_loop', [ $srv, 'showSeoDescription' ], 5);
}
}, 20);
// 3) Forzar <title> y meta description desde la Regla SEO
add_action('wp', function () {
$srv = fepro_get_seo_service();
if ( ! $srv ) return;
if ( method_exists($srv, 'seoTitle') ) {
add_filter('pre_get_document_title', [$srv, 'seoTitle'], -5); // Core WP
add_filter('wpseo_title', fn($t)=>$srv->seoTitle($t), -5); // Yoast
add_filter('rank_math/frontend/title', fn($t)=>$srv->seoTitle($t), -5); // RankMath
}
$getDesc = function () use ($srv) {
if ( method_exists($srv, 'getSeoMetaDescription') ) {
$d = $srv->getSeoMetaDescription();
if ( ! empty($d) ) return $d;
}
return null;
};
add_filter('wpseo_metadesc', function ($d) use ($getDesc) { return $getDesc() ?: $d; }, -5);
add_filter('rank_math/frontend/description', function ($d) use ($getDesc) { return $getDesc() ?: $d; }, -5);
});