Forums Forums Search & Filter Pro Query in filter

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #58351

    Hi,

    Sorry for my english, i speak spanish.

    When i’m displaying the results in a archive like search.php o archive.php the plugin doesn’t affect the query and doesn’t work.

    For fix this i have to create other file named filter.php and add the line search_filter_id in query_posts manually, but is not the idea.

    I use a custom theme created for me and i use the default loop:

    <?php if (have_posts()) : while (have_posts()) : the_post(); get_template_part('loop/loop', 'place'); endwhile; ?>

    Regards

    Trevor
    #58365

    Ola Matias

    Can you look and see if the template (or any file it includes) has an args array like this:

    $args = array(
      'posts_per_page'   => 6,
      'cat'              => 5,
      'order'            => 'ASC',
      'search_filter_id' => '435'
    );
    query_posts( $args );

    Notice the last line? It is a special line for Search & Filter and is the ID of the search form.

    Anonymous
    #58445

    Hi Trevor,

    I need the filter work with archive.php but when i add the ‘search_filter_id’ args, the archive.php only work with sf and doesn’t work with others querys.

    I try to create a file named filter.php with the query, but i have two filters (one in my home and other in the archive) and i can’t create an array in the args with the id of search_filter_id

    You understend me ?
    Regards,

    P.S.: Is ‘Hola’ with ‘H’ 😛 hahahaha

    Trevor
    #58460

    Oops – Hola

    Have a look at this thread, maybe it will help?

    https://support.searchandfilter.com/forums/topic/sf-not-affecting-query_posts-function-how/

Viewing 4 posts - 1 through 4 (of 4 total)