Forums › Forums › Search & Filter Pro › double result page for single form
Tagged: replicated, result listing
- This topic has 6 replies, 2 voices, and was last updated 8 years, 1 month ago by Anonymous.
-
Anonymous(Private) November 2, 2016 at 9:29 am #67748
On your documentation
https://www.designsandcode.com/documentation/search-filter-pro/accessing-search-data/
you say this is possible querying the form from another page:
<?php //grab the active query from our search form //replace <code>1526</code> with the ID of your search form global $searchandfilter; $sf_current_query = $searchandfilter->get(1526)->current_query(); ?>
Whould this display the filtered posts to a php template?
Trevor(Private) November 2, 2016 at 10:34 am #68063Sorry, I do not quite understand what you are trying to achieve. That code could be used on a results page to get the actual query variable as sent by the form. Under normal circumstances, Search & Filter will use these to provide the wp_query arguments to filter the posts to make the results loop. You could use the Custom method, and to do this all you have to then do is find when the arguments for the loop are set, and immediately after them add code like this:
$args['search_filter_id'] = 16439;
As shown in this post (obviously change the ID number of the form):
https://support.searchandfilter.com/forums/topic/help-with-search-form-creation/page/2/#post-65516
-
AuthorPosts