Documentation

Custom

Custom display method requires you to do 2 things:

  1. Attach Search & Filter to a query
  2. Enter the results URL where the query/results will be found

Attaching S&F to a query is easy enough, there are 3 ways to do this:

WP_Query

If using WP_Query then all you need to do is pass in the ID,:

$args = array('post_type' => 'post');
$args['search_filter_id'] = 123;
$query = new WP_Query($args);

query_posts

If you prefer to use a more standard template (such as one from your theme) then you might want to use query_posts, again pass in the arguments to $args or alternatively you can run our action which makes things a bit easier:

do_action("search_filter_query_posts", 123);

pre_get_posts

You can even attach S&F to a query when in the WP filter – pre_get_posts.

To do this, just call set on the query, and again, set S&F ID:

function pre_get_posts_function($query)
{
//this would be a pre_get_posts you already have in place somewhere
//then set `search_filter_id`
$query->set("search_filter_id", 123);
}
add_action( 'pre_get_posts', array($this, 'pre_get_posts_function') );