wp-page-numbers incorrectly displaying on news only home page
-
I have a home page with the following code above the loop to show News posts only.
<?php if (have_posts()) : ?>
<?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query(‘showposts=10′.’&paged=’.$paged.’&category_name=News’);
?>I also have wp-post-numbers installed, which is displayed as follows:
<?php if(function_exists(‘wp_page_numbers’)) { wp_page_numbers(); } ?>
For some reason the wp-page numbers cannot display the page numbers properly. For example, if I set it to display 10 posts per page and I have 18 posts in total I would expect it to show only two page numbers (one for each page – ten on the first; eight on the next). Instead It shows three, and if you click on the third one it displays an error (no posts found).
Any ideas or workaround?
- The topic ‘wp-page-numbers incorrectly displaying on news only home page’ is closed to new replies.