XStore hook to render Filter Everything Pro SEO H1 & description on WooCommerce archives

This topic has 9 replies, 2 voices, and was last updated 1 months, 1 weeks ago ago by Juan Alberto Montoya

  • Avatar: Juan Alberto Montoya
    Juan Alberto Montoya
    Participant
    September 30, 2025 at 12:38

    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 , the and meta description from that Rule</p> <p>Example</p> <p>Filter combination: Product Category = “Juegos de mesa” + Attribute (Age) = “5 años”</p> <p>Test URL: <a href="https://test1.tellescode.com/shop/producto-de-mesa/edad-5-a-6-anos/" rel="nofollow">https://test1.tellescode.com/shop/producto-de-mesa/edad-5-a-6-anos/</a></p> <p>Expected visible H1: “Juegos de mesa para niños de 5 años”</p> <p>Expected visible description: the SEO Description configured in the Rule</p> <p>Expected in <head>: <title> and <meta name="description"/> from the Rule</p> <p>What happens now with XStore</p> <p>The archive view still prints the “Shop” page title from the theme, instead of the H1 provided by Filter Everything Pro.</p> <p>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.</p> <p>Filter Everything Pro correctly generates the URL and I can force / meta description via filters, but I cannot get the H1 + description to render in the page heading area that XStore outputs.</p> <p>What I already tried</p> <p>Disabling “Show Page Title” for shop/categories in Theme Options (to avoid the default “Shop” H1).</p> <p>Moving Filter Everything Pro’s output to woocommerce_archive_description so it appears under the breadcrumb.</p> <p>Preventing duplicates by removing the plugin’s default woocommerce_after_shop_loop description output.</p> <p>Clearing all caches and re-saving permalinks.</p> <p>Documentation followed<br /> We implemented the approach described here, but it seems not to work as expected with XStore:<br /> <a href="https://filtereverything.pro/resources/all-about-seo/" rel="nofollow">https://filtereverything.pro/resources/all-about-seo/</a></p> <p>Questions</p> <p>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?</p> <p>Current snippet I’m using (works in other themes, but on XStore the H1/Description do not appear in the page heading area):</p> <pre><code>// === 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); }); </code></pre> <p>

    Please, contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.
    8 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    October 2, 2025 at 17:19

    Hi @Juan Alberto Montoya,

    Could you please contact the plugin’s author to inquire which hooks they are using to display the H1 and description on WooCommerce archive pages?

    This will allow us to add the missing hooks for you through our custom code.

    Thank you!

    Best regards,
    8Theme’s Team

    Avatar: Juan Alberto Montoya
    Juan Alberto Montoya
    Participant
    October 2, 2025 at 17:36

    They say in the official website “https://filtereverything.pro/resources/all-about-seo/&#8221; that they saythe following about their hooks:

    SEO Troubleshooting
    Issues with the SEO H1
    By default Filter Everything uses next hooks to modify H1:

    
    add_filter( 'the_title', [ $this, 'seoH1' ], 10, 2 );
    add_filter( 'woocommerce_page_title', array( $this, 'seoH1'), -5 );
    add_filter( 'get_the_archive_title', array( $this, 'seoH1'), -5 );
    add_filter( 'avada_page_title_bar_contents', [$this, 'seoH1'], -5 );
    add_filter( 'post_type_archive_title', [$this, 'seoH1'], -5 );
    add_filter( 'elementor/utils/get_the_archive_title', [$this, 'seoH1'], -5 );
    

    Some WordPress themes use individual H1 hooks in their template files. You can use the code below to specify your theme H1 hook:

    
    add_action('wp', 'wpc_test');
    function wpc_test()
    {
        if (class_exists('FilterEverything\Filter\Pro\PluginPro')) {
            $seoFrontend = \FilterEverything\Filter\Container::instance()->getSeoFrontendService();
    
            add_filter('your_theme_h1_hook', [$seoFrontend, 'seoH1'], -5);
        }
    }
    

    Issues with SEO Description
    By default SEO Rule description is attached to the next hooks

    
    // On WooCommerce pages
    add_action( 'woocommerce_after_shop_loop', [ $seoFrontEnd, 'showSeoDescription' ] ); 
    // On the WordPress archive pages
    add_action( 'get_the_archive_description', [ $seoFrontEnd, 'showSeoDescription' ] ); 
    

    Some WordPress themes use individual hooks in their template files and often replace default WordPress and WooCommerce hooks. You can use the code below to specify your theme hook:

    
    add_action('wp_head', 'wpc_add_filters_seo_description');
    function wpc_add_filters_seo_description(){
        if( class_exists( 'FilterEverything\Filter\Container' ) ){
            $seoFrontEnd = FilterEverything\Filter\Container::instance()->getSeoFrontendService();
    
            // Specify here your hook where you want to see the SEO description
            $your_new_hook = 'woocommerce_archive_description';
    
            // Only if you need to hide the default description on category pages
            if( flrt_is_filter_request() ){
                // Remove WooCommerce archive description
                remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
            }
    
            // Remove the default SEO description from the bottom of the page so it won't be duplicated
            remove_action('woocommerce_after_shop_loop', [ $seoFrontEnd, 'showSeoDescription' ], 5);
    
            // Add SEO description on your hook
            add_action( $your_new_hook, [ $seoFrontEnd, 'showSeoDescription' ] );
        }
    }
    
    Avatar: Justin
    Luca Rossi
    Support staff
    October 6, 2025 at 06:56

    Hi @Juan Alberto Montoya,

    Thank you for your message. Our team is currently preparing the custom code adjustments based on the information provided from the Filter Everything documentation. We will review the necessary hooks and get back to you shortly with the appropriate implementation details.

    Best regards,
    8Theme’s Team

    Avatar: Juan Alberto Montoya
    Juan Alberto Montoya
    Participant
    October 6, 2025 at 17:41

    Ok i’ll be waiting, thanks

    Avatar: Justin
    Luca Rossi
    Support staff
    October 7, 2025 at 09:42

    Dear @Juan Alberto Montoya,

    1. We have added the custom hooks to your website using the following custom code:

    
    add_shortcode( 'do_hook', function( $atts = array(), $content = null, $tag = '' ) {  
        if ( isset( $atts['hook'] ) ) {  
            do_action( $atts['hook'] );  
        }  
        return;  
    });  
    

    2. We’ve also added the following shortcodes below the shop title and shop loop:

    
    [do_hook hook="xstore_after_shop_title"]
    [do_hook hook="xstore_after_shop_loop"]
    

    3. You can now use the two hooks mentioned above. The custom code will look as follows:

    
    add_action('wp', 'wpc_test');
    function wpc_test()
    {
        if (class_exists('FilterEverything\Filter\Pro\PluginPro')) {
            $seoFrontend = \FilterEverything\Filter\Container::instance()->getSeoFrontendService();
    
            add_filter('xstore_after_shop_title', [$seoFrontend, 'seoH1'], -5);
        }
    }
    
    add_action('wp_head', 'wpc_add_filters_seo_description');
    function wpc_add_filters_seo_description(){
        if( class_exists( 'FilterEverything\Filter\Container' ) ){
            $seoFrontEnd = FilterEverything\Filter\Container::instance()->getSeoFrontendService();
    
            // Specify here your hook where you want to display the SEO description
            $your_new_hook = 'xstore_after_shop_loop';
    
            // Only if you need to hide the default description on category pages
            if( flrt_is_filter_request() ){
                // Remove WooCommerce archive description
                remove_action( 'woocommerce_archive_description', 'woocommerce_taxonomy_archive_description', 10 );
            }
    
            // Remove the default SEO description from the bottom of the page to avoid duplication
            remove_action('woocommerce_after_shop_loop', [ $seoFrontEnd, 'showSeoDescription' ], 5);
    
            // Add the SEO description to your custom hook
            add_action( $your_new_hook, [ $seoFrontEnd, 'showSeoDescription' ] );
        }
    }
    

    Please add this custom code to the functions.php file located in your child theme.

    Best regards,
    8Theme Team

    Avatar: Juan Alberto Montoya
    Juan Alberto Montoya
    Participant
    October 9, 2025 at 13:58

    It didn’t work for me 😔 I have another idea! Could you please recommend a different plugin that offers the same features as ‘Filter Everything Pro SEO’, but that you’re sure is compatible with the XStore theme?

    Avatar: Justin
    Luca Rossi
    Support staff
    October 9, 2025 at 14:10

    Dear @Juan Alberto Montoya,

    Thank you for your feedback and for letting us know that it didn’t work for you. We appreciate your patience and understanding.

    Regarding your request, we recommend trying alternative filtering plugins that are known to work well with the XStore theme, such as WOOF – Products Filter for WooCommerce or YITH WooCommerce Ajax Product Filter. These plugins offer similar functionality and have been successfully used by many XStore users.

    Please let us know if you need any assistance with the setup or configuration.

    Best Regards,
    8Theme’s Team

    Avatar: Juan Alberto Montoya
    Juan Alberto Montoya
    Participant
    October 23, 2025 at 17:49

    Thanks for the support! My topic “XStore hook to render Filter Everything Pro SEO H1 & description on WooCommerce archives” has been successfully resolved.

  • Viewing 9 results - 1 through 9 (of 9 total)

The issue related to '‘XStore hook to render Filter Everything Pro SEO H1 & description on WooCommerce archives’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.