• Resolved dool676

    (@dool676)


    When you serach using Fibosearch it doesn’t direct you to the search results template i made in Elementor, instead it takes you to the default unedited search results page.

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

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

    (@c0nst)

    Hi @dool676!

    1. Please ensure sure you use the Archive Products or Elementor Loop widget to show products.
      See the below screenshot for reference:
      https://fibosearch.com/wp-content/uploads/2020/05/chrome_auNFs55wNd.png
    2. Please ensure you include the “Search results” in the Display Condition in the template you want to use as the research results page. See the below screenshot for reference.
      https://prnt.sc/3cVoKJFXsqRo
      https://prnt.sc/lcsdqDxTpt7G
    3. If both of the above conditions are met, try this solution:

    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 );

    If the above method doesn’t work, please install the Query Monitor plugin and check which function can overwrite FiboSearch results with its own. It can be other search or filter plugins. Enable the Query Monitor plugin and go to the search results page. In the top bar of the administration panel, you will see the results from Query Monitor. Open the entire plugin panel and go to the Hooks & Actions tab. Then search with CTRL + F for the word “pre_get_posts“. There you will find a list of all the functions that overwrite search results. Try to determine which plugin is doing this except FiboSearch and temporarily disable it, then check if the search results are correct. See the below screenshot for reference:
    https://prnt.sc/cvR5edSefDkX

    Regards,
    Kris

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