• Resolved momo-fr

    (@momo-fr)


    Hi, I try to use your plugin on a eCommerce shop website but the search results are empty…

    I have same plugin on other eCommerce shop website (same theme Blocksy) and it’s work fine.

    The page I need help with: [log in to see the link]

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

    (@c0nst)

    Hi @momo-fr!

    One common error that can arise during the creation of a search results page in Elementor is selecting the incorrect page template. A frequent occurrence is users opting for a WordPress search template instead of a WooCommerce search template.

    Make WooCommerce search results in the right way

    To begin with:

    1. Go to Templates -> Theme Builder -> Add new

    2. Create a?Product Archive?page (screenshot)

    3. Add?Archive Products?and the Archive title widget to your template (screenshot)

    4. After finishing creating a template, set the condition to?Include?->?Search results (screenshot)

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

    Still doesn’t work?

    Check if you have more than one Product Archive template (screenshot).?

    If so, open all templates that aren’t “Search Results” and add an extra condition:?Exclude?->?Search Results (screenshot).

    Sometimes excluding “Search Results” from the Shop page still doesn’t work. In such cases, create an empty search.php file in the root of your child theme and paste there the following code. 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, the $template_id is 100, but in your case, it will be a different number.

    <?php
    $frontend    = new \Elementor\Frontend();
    $template_id = 100; // Your search results template ID
    echo $frontend->get_builder_content_for_display( $template_id, $with_css = true );

    Also, try this solution that overrides the search results page. Add the following code to your child-theme. This way, you’ll be able to edit the search.php file, which will load when the search results page contains results from FiboSearch.

    // Load search.php template on the FiboSearch search results page
    add_filter( 'template_include', function ( $template ) {
    	if ( isset( $_GET['dgwt_wcas'] ) ) {
    		$template = locate_template( 'search.php' );
    	}
    
    	return $template;
    }, PHP_INT_MAX - 1 );

    You have two ways to add this code to your theme:

    1. Open the functions.php in your child theme and add the code at the end.
    2. or install the Code Snippets plugin and apply this code as a snippet.

    If none of the above methods work, try deactivating each plugin one by one. This way, you will determine if any of them is causing a conflict with FiboSearch. Additionally, try switching to a different theme (e.g., Storefront) to rule out any issues on its end.

    Regards,
    Kris

Viewing 1 replies (of 1 total)
  • The topic ‘Not work on this website’ is closed to new replies.