Forums › Forums › Search & Filter Pro › S&F URL is breaking my pagination
- This topic has 5 replies, 2 voices, and was last updated 6 years, 10 months ago by Anonymous.
-
Anonymous(Private) January 19, 2018 at 2:59 pm #153546
Hello!
I would like to use my own code for numbered pagination. For the most part, everything is working great, but my active state for the pagination doesn’t change to match the URL and I discovered it’s because the plugin is overwriting the URL. Do you know how I can make these two get along?
<?php // The Query $paged = get_query_var('paged') ? get_query_var('paged') : 1; $args = array( 'posts_per_page' => 9, 'paged' => $paged ); $args['search_filter_id'] = 452; $the_query = new WP_Query($args); // The Loop if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); ?> <div> <a href="<?php the_permalink(); ?>"> <h3><?php the_title(); ?></h3> <h4>By <?php the_author(); ?></h4> </a> </div> <?php } // wp_reset_postdata(); } else {} ?> $big = 999999999; echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?sf_paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $the_query->max_num_pages, ) );
Anonymous(Private) January 19, 2018 at 4:37 pm #153576Everything is already set up and styled with my existing code. The client wanted to add in the filter after it was complete. So, it’s partially to save time, and partially because I can’t seem to find whether S&F has a numerical pagination option.
Trevor(Private) January 19, 2018 at 4:46 pm #153582Ah. I think you will still need to use our pagination as it is and style it. If you are using our Shortcode Results method, that is coded to use styling from the WP-PageNavi plugin if also installed. That then gives the numbering and styling options.
-
AuthorPosts