Forums › Forums › Search & Filter Pro › multiple pages result are not working
Tagged: multi page results not working
- This topic has 78 replies, 3 voices, and was last updated 9 years, 5 months ago by
Anonymous.
-
Ross Moderator(Private) April 13, 2016 at 2:22 pm #42631
Hi Robert I didn’t manage to find a solution yet, I will be jumping back on to this in the next couple of hours.
Thanks
Ross Moderator(Private) April 15, 2016 at 8:38 pm #42879Hi Robert
Yes this is because you have the S&F “do_query” action in your index.php, so no matter what happens S&F is overriding the query – including for the archives.
What you want to do is only apply the S&F query on the homepage, and the S&F search results pages…
I don’t have ftp access anymore, but I downloaded a copy of your theme (for find & replace) and have just updated the code of index.php:
<?php get_header(); ?> <div id="container"> <div class="stars"> <img src="http://www.plasticat.net/bg.jpg" alt="" class="full-bg animation-pulseSlow"/> </div> <?php tamatebako_skip_to_content(); ?> <?php get_template_part( 'site-header' ); ?> <div id="main"> <div class="main-inner"> <div class="main-wrap"> <main <?php hybrid_attr( 'content' ); ?>> <?php global $searchandfilter; if(($searchandfilter->active_sfid())||(is_front_page())) { do_action('search_filter_do_query', 125); } if ( have_posts() ){ /* Posts Found */ ?> <?php /*tamatebako_archive_header(); */ ?> <div class="content-entry-wrap"> <?php while ( have_posts() ) { /* Start Loop */ ?> <?php the_post(); /* Load Post Data */ ?> <?php /* Start Content */ ?> <?php tamatebako_get_template( 'content' ); // Loads the content/*.php template. ?> <?php /* End Content */ ?> <?php } /* End Loop */ ?> </div><!-- .content-entry-wrap--> <?php tamatebako_archive_footer(); ?> <?php } else { /* No Posts Found */ ?> <?php tamatebako_content_error(); ?> <?php } /* End Posts Found Check */ ?> </main><!-- #content --> </div><!-- .main-wrap --> </div><!-- .main-inner --> <?php hybrid_get_sidebar( 'primary' ); ?> </div><!-- #main --> <?php get_template_part( 'site-footer' ); ?> </div><!-- #container --> <?php get_footer(); // Loads the footer.php template. ?>
Notice the
do_action('search_filter_do_query', 125);
has changed to be inside the if statement.Thanks
Ross Moderator(Private) April 15, 2016 at 9:26 pm #42898No problem, thanks! – if you have the time would be great to get a review from you – http://www.designsandcode.com/wordpress-plugins/search-filter-pro/reviews/#comment 🙂
-
AuthorPosts