// Search


Allow users to filter content by keyword(s).


Available Options


Name Description
Search engine Which search engine to use (extra engines appear if SearchWP or our Relevanssi integration add-on is installed)
Placeholder text The default text that appears within the search input
Auto refresh Whether to automatically refresh the results while typing

Result limits

By default, a search facet returns a maximum of 200 results. However, this limit can be lifted via the following hook:

add_filter( 'facetwp_search_query_args', function( $search_args, $params ) {
    $search_args['posts_per_page'] = -1;
    return $search_args;
}, 10, 2 );

Relevancy sort

With a search facet is in use, the results are automatically ordered by relevancy. To disable this feature, add the following code:

add_filter( 'facetwp_use_search_relevancy', '__return_false' );