Note: You are viewing the documentation for Version 3View Version 4 Docs


View the installation guide, browse the Knowledge Base, find out about SearchWP's many hooks, get support

Compatibility with JetSmartFilters for Elementor

SearchWP works with Elementor custom Search Archive templates, but JetSmartFilters overrides SearchWP’s results by hijacking archive queries.

There are two options if you’re running into this problem. If you are not using JetSmartFilters on any archive pages you can navigate to the following WordPress Admin Menu screen: Elementor > JetSmartFilters Settings and un-tick this checkbox:

Once that is un-ticked you can click the Save button and the issue will be resolved.

If, however, you are using JetSmartFilters on other archive pages, you can instead us this snippet to disable JetSmartFilters on search archive pages, allowing you to use Elementor’s Search Archive Template customization, utilizing the Elementor Archive Posts Widget to display the search results.

It’s a a quick fix; you can add this snippet to your theme’s functions.php (or a custom plugin you’ve built) and it will allow SearchWP’s results to be displayed:

// Prevents JetSmartFilters from overriding SearchWP's results.
// @link
add_action( 'init', function() {
add_filter( 'elementor/theme/posts_archive/query_posts/query_vars', function( $query ) {
if ( is_search() && is_main_query() ) {
remove_all_filters( 'elementor/theme/posts_archive/query_posts/query_vars' );
return $query;
}, -1 );
}, -998 );
view raw functions.php hosted with ❤ by GitHub

The above snippet takes advantage of Jet Smart Filter’s priorities of its internal hooks to prevent it from overriding SearchWP’s results on search results archive pages.

Fix keyword search on your site. No coding required!

Now you can utilize all of the content that's gone unrecognized by native WordPress keyword search instantly with SearchWP

Get SearchWP