francdore
Banned
Hey there. I installed WP Paging on my Wordpress blog and the paging buttons show up fine. But I have a problem. It displays the first page fine with 10 posts as I specified it. But when I click page two it displays ALL posts on one page and not the next 10 posts? How do I fix this? This is my code below. Thank you in advance.
PHP:
<?php endwhile; ?>
<?php else : ?>
<?php endif; ?>
<?php wp_reset_query(); // for pagination ?>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; // for pagination ?>
<?php $posts_query = new WP_Query($query_string.'tag=homepost&posts_per_page=-1');
if(!$posts_query -> have_posts()){
$latestposts_no = get_option('designpile_latest_posts');
if($latestposts_no != null){
$posts_query = new WP_Query($query_string.'posts_per_page='.$latestposts_no);
}else{
$posts_query = new WP_Query($query_string.'&posts_per_page=10&paged='.$paged);
}
}
$odd_or_even = 'odd'; ?>
<?php if ($posts_query -> have_posts()) : while ($posts_query -> have_posts()) : $posts_query -> the_post(); ?>
<div class="homePost <?php echo $odd_or_even; ?>">