WordPress.org

Forums

posts_per_page » shows empty posts (1 post)

  1. frmars
    Member
    Posted 5 years ago #

    Hello again

    In a column of my theme, I created a loop retrieving 10 paged posts from category 6.

    <?php query_posts('posts_per_page=10&cat=6&paged='.$paged); ?>

    Then the usual loop :

    <?php while (have_posts()) : the_post(); ?>
    [bla bla bla]

    When moving to page 2, 3 etc... and then reaching the end of the posts, Worpress does not see that there are no more posts and tries to display all ten of them, even though they are empty.

    See screen capture

    Is that normal ? How am I to tell WP that the post is empty and not display it ?

Topic Closed

This topic has been closed to new replies.

About this Topic