Skip to main contentSkip to footer

Jetpack has Infinite Scroll, which is a pretty cool feature, but unfortunately doesn’t work with Relevanssi on search results pages. Infinite Scroll uses WP_Query to get more posts, and that isn’t compatible with Relevanssi.

I’m not aware of a solution that would allow Infinite Scroll to work with Relevanssi. There isn’t enough room for customization in Infinite Scroll, unfortunately. If you want to use Infinite Scroll on a site with Relevanssi, you need to disable it on search pages.

Here’s how you can disable Infinite Scroll on search pages:

function rlv_disable_infinite_scroll() {
	if ( is_search() ) return false;
	return current_theme_supports( 'infinite-scroll' );
}

add_filter( 'infinite_scroll_archive_supported', 'rlv_disable_infinite_scroll' );

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

Sorting search results
If you want something else than the default relevancy ranking, you can use orderby and order parameters for the search…
Toolset Views
Relevanssi works fine with Toolset, thanks to a lot of compatibility code the makers of Toolset have included in it…

Related Posts:

Comment Section:

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed