Missing Posts from Page 1 to 2 in Loop
-
Hello,
My website, TCStarlight.com is missing posts when you go from page 1 to 2 on the main index and in each category. The problem is obviously in the loop, but I am not good with coding and can’t figure it out —
<?php endwhile; ?> <?php } ?> <?php if($paged == 0) { ?> <?php query_posts('posts_per_page=4' . '&offset=1' . '&paged=' . get_query_var('paged')); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post-block"> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <p class="meta"><?php the_time('F j, Y'); ?> - <?php the_time('g:i a'); ?> - <?php the_author_posts_link(); ?></p> <div class="thumb"> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a> </div><!--thumb--> <center><span class='st_facebook' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span> <span class='st_twitter' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' st_via='TCStarlight'></span> <span class='st_pinterest' st_title='<?php the_title(); ?>' st_url='<?php echo the_id(); ?>'></span> <span class='st_googleplus' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span> <span class='st_linkedin' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span> <span class='st_email' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span></center> <br /> <p style="text-align: center;"><?php the_category(' ? '); ?></p> </div><!-- postblock--> <?php endwhile; endif; ?> <?php } elseif($paged >= 1) { ?> <?php query_posts('posts_per_page=8' . '&paged=' . get_query_var('paged')); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post-block"> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <p class="meta"><?php the_time('F j, Y'); ?> - <?php the_time('g:i a'); ?> - <?php the_author_posts_link(); ?></p> <div class="thumb"> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a> </div><!--thumb--> <center><span class='st_facebook' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>'></span> <span class='st_twitter' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' st_via='TCStarlight'></span> <span class='st_pinterest' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' ></span> <span class='st_googleplus' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' ></span> <span class='st_linkedin' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' ></span> <span class='st_email' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' ></span></center> <br /> <p style="text-align: center;"><?php the_category(' ? '); ?></p> </div><!-- postblock --> <?php endwhile; endif; ?> <?php } ?>
Any help would be greatly appreciated! Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Missing Posts from Page 1 to 2 in Loop’ is closed to new replies.