Forums › Forums › Search & Filter Pro › Custom WP_Query using shortcode won’t filter results
Tagged: custom query, default post
- This topic has 18 replies, 2 voices, and was last updated 4 years, 1 month ago by Anonymous.
-
Anonymous(Private) November 2, 2020 at 1:44 pm #264929
Works for me too! so it was adding
'search_filter_id' => 3768
,?`$args = array(
‘post_type’ => ‘post’,
‘tax_query’ => array(array(
‘taxonomy’ => ‘post_format’,
‘field’ => ‘slug’,
‘terms’ => array(‘post-format-video’),
‘operator’ => ‘IN’
)),
‘search_filter_id’ => 3768,
);funny, because I added it according to the S&F documentation but it didn’t work.
$args = array(‘post_type’ => ‘post’);
$args[‘search_filter_id’] = 123;
$query = new WP_Query($args);
https://searchandfilter.com/documentation/search-results/custom/thank you!
-
AuthorPosts