WordPress.org

Ready to get started?Download WordPress

Forums

Pagination Problem (4 posts)

  1. Jim Bouton
    Member
    Posted 3 years ago #

    I have put this in the loop in order to display post excerpts in different formats, it work but when i added pagination it simply displays the same posts on subsequent pages as it does on the home page.

    <?php if (in_category('two_columns_right') ):  // we're in the two columns right category ?>
    
    <?php elseif (in_category('two_columns_left') ):  // we're in the two columns left category ?>
    
    <?php elseif (in_category('two_columns_text') ):  // we're in the two columns text category, two_columns_text ?>
    
    <?php elseif (in_category('single_column') ):  // we're in the single column category, two_columns_text ?>
    
    <?php endif; ?>
  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    can you paste the whole code of that template into a http://wordpress.pastebin.com/ and post the link to it here?

    the above posted code is not sufficient to comment on your problem.

    it could be a missing 'paged' parameter in your query - check:

    http://codex.wordpress.org/Function_Reference/query_posts#Pagination_Parameters

  3. Jim Bouton
    Member
    Posted 3 years ago #

  4. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    try to add
    <?php global $query_string; ?>
    before this line:
    <?php query_posts($query_string . '&cat=5,1,6,7'); ?>

    http://codex.wordpress.org/Function_Reference/query_posts#Usage_Note

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags