remove default pagination on woocommerce shop page
Add below code in file functions.php: remove_action( ‘woocommerce_after_shop_loop’, ‘woocommerce_pagination’, 10 );
Add below code in file functions.php: remove_action( ‘woocommerce_after_shop_loop’, ‘woocommerce_pagination’, 10 );
Works for me global $wp_query; if ( function_exists( ‘pagination’ ) ) { pagination( $wp_query->max_num_pages ); }else { // Previous/next page navigation. the_posts_pagination( array( ‘prev_text’ => __( ‘Previous’ ), ‘next_text’ => __( ‘Next’ ), ‘screen_reader_text’ => __( ‘ ‘ ) //’before_page_number’ => ‘<span class=”meta-nav screen-reader-text”>’ . __( ‘Page’ ) . ‘ </span>’, )); };
Can you try this? $paged = (get_query_var(‘page’)) ? get_query_var(‘page’) : 1;
$my_query = new WP_Query( array( ‘posts_per_page’ => 3, ‘paged’ => get_query_var(‘paged’) ) ); while ( $my_query->have_posts() ) : $my_query->the_post(); the_title(); // more stuff here endwhile; wp_pagenavi( array( ‘query’ => $my_query ) ); wp_reset_postdata(); try this code and also increase the size of show posts in SETTINGS->Reading->Blog pages show at most 10 to 50 or 100, … Read more
<?php $catname = wp_title(”, false); $wp_query = new WP_Query(); $wp_query->query(‘category_name=”.$catname.”&showposts=5′.’&paged=’.$paged); ?> <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?> <?php the_title(); ?> <?php } ?> <?php endwhile; ?> <?php next_posts_link(‘« Older Entries’) ?> <?php previous_posts_link(‘Newer Entries »’) ?> I think that you need to look at the $paged variables.
<form method=”post” action=”<?php bloginfo(‘url’); ?>/customsearch.php” class=”search-form” role=”search”> … </form> customsearch.php in content : http://pastebin.com/mxVPphXa customsearch.php should be here: yoursite.com/dir/customsearch.php
index.php is the default template, the fallback. If we look here: http://codex.wordpress.org/Template_Hierarchy And at the diagram: We can see here that search.php is the appropriate template. Have you considered using author.php and the author archives instead of modifying the search template? There are far better ways of implementing what you want, even the searching via … Read more
The ../page/X structure ties to pagination, not to post names. I’m sure you could change them but I’m not sure how deep the effects of the change would be. Have you thought about an alternate solution? Name each post your chapter name Forward Chapter 1 Chapter 2 Add a plugin that adds previous / next … Read more
I would advise you to use the paginate_links() see the details in the answer for this question. WordPress Pagination not working with AJAX kindly,
It’s a strange, but when in wordpress setting – reading “blog page show at most” number equal with post_per_page in my loop everything is working!)