Viewing 1 replies (of 1 total)
  • Plugin Support Kris

    (@c0nst)

    Hi @shalini143!

    This is because Elementor controls your search results page. Follow the below tutorial to make WooCommerce search results in the right way:

    1.?Go to Templates?->?Theme Builder?->?Add new
    2. Create a?Product Archive?page.
    3. Add?Archive Products?and the Archive-title widget to your template.
    4. After finishing creating a template, set the condition to?Include?->?Search results

    That way, the search results page will be created properly.

    Still doesn’t work?
    Check if you have more than one Product Archive template.
    If so, open all templates that aren’t “Search Results” and add an extra condition:?Exclude?->?Search Results
    Sometimes excluding “Search Results” from the Shop page still doesn’t work. In such cases, create an empty?fibosearch-search-results.php?file in the root of your child theme and paste the following code.

    <?php
    get_header( 'shop' );
    $frontend = new \Elementor\Frontend();
    $template_id = 100; // Your search results template ID
    echo \Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $template_id, true );
    get_footer( 'shop' );

    The?$template_id?variable is the post ID of the Elementor template with WooCommerce search results. You can find this ID on the URL. Go to Templates -> Theme Builder -> Products Archive and open the template with the search results. The URL should be like this?https://your-domain.com/wp-admin/post.php?post=100&action=elementor. In this case, there?$template_id?is?100, but in your case, it will be a different number.
    After creating this file, use the below snippet to force Elementor to use the newly created template. Open the?functions.php?in your child theme, add the code at the end, or install the?Code Snippets?plugin and apply it as a snippet.

    <?php
    add_filter( 'template_include', function ( $template ) {
    if ( isset( $_GET['dgwt_wcas'] ) ) {
    $search_template = locate_template( 'fibosearch-search-results.php' );
    if ( file_exists( $search_template ) ) {
    return $search_template;
    }
    }
    return $template;
    }, PHP_INT_MAX - 1 );

    Regards,
    Kris

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.