How to change page location in WordPress
Under “Settings” -> “Reading” in the wp-admin you (or other users) can set which page should be used as the home page.
Under “Settings” -> “Reading” in the wp-admin you (or other users) can set which page should be used as the home page.
You should change the first line of your code to: $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; So it sets $paged to 1, when your are on the first page.
Finally got this working nicely, this specific issue was just down to not flushing the rewrite rules (gets me everytime!) so it was fixed by simply navigating to the ‘Permalinks’ page in the WP admin area.
WordPress Pagination Not Working After Transfer from Localhost
Use this for pagination <?php $paged = ( get_query_var( ‘paged’ ) ) ? absint( get_query_var( ‘paged’ ) ) : 1; $mostpopular_args=array( ‘post_type’ => ‘post’, ‘orderby’ => ‘meta_value_num’, ‘meta_key’ => ‘view_count’, ‘paged’ => $paged, ‘posts_per_page’ => ’10’, ); $wp_query = new WP_Query($mostpopular_args); while ($wp_query->have_posts()): $wp_query->the_post(); get_the_title(); endwhile; global $wp_query; $big = 999999999; // need an unlikely … Read more
Paginating custom query on category template
Pagination cannot be reliably implemented in template. It is resolved during load way before template it ever reached. Unless you implement it from scratch (complete with rewrite) you need to be using pre_get_posts or other related hook to modify main query. Look around the site, there are plenty answer on topic of here.
As Milo suggested I had to alter the main query. Followed the following: https://stackoverflow.com/questions/21954101/wordpress-3-8-1-category-page-2-error-404-not-found-custom-post-type?rq=1
bones_page_navi and pre_get_posts Action
Make use of the WordPress template hierarchy, by either having a home.php – home page – or a front-page.php – front page – to display the site home/front. Read the WordPress codex article Creating a Static Front Page for an insight on how to do it and some explanation about the differences. Do not use … Read more