• Resolved antoniofourmark

    (@antoniofourmark)


    So i’m trying to get fibosearch to display the search results on elementor “Search Results” template but it goes to “Product Archive” template no matter what.

    Tried to replace search.php in child theme with your suggestion (putting search results template ID there) but it doesn’t work (displays wordpress default search results)

    Is there a way to do this? Or at least disable the full search.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Kris

    (@c0nst)

    Hi @antoniofourmark

    Try this code to force load the search.php file on the FiboSearch search results page:

    // 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.

    Regards,
    Kris

    Thread Starter antoniofourmark

    (@antoniofourmark)

    Had to copy search.php from main theme to child theme but its not working, its showing plain results with no styling or anything

    Thread Starter antoniofourmark

    (@antoniofourmark)

    Any other solution?

    Thread Starter antoniofourmark

    (@antoniofourmark)

    Fixed it by my own

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Use elementor Search results template instead of Product Archive’ is closed to new replies.