WordPress.org

Ready to get started?Download WordPress

Forums

Issue with Pagination? (4 posts)

  1. creati54
    Member
    Posted 3 years ago #

    For some reason, pagination isn't working for me. Here's a link to my site to see what I mean. Any ideas why?

    http://hawtheels.com

  2. vtxyzzy
    Member
    Posted 3 years ago #

    This is usually caused by not adding the paged argument to the query. The code looks something like this:

    if (!($paged = get_query_var('paged'))) {
       if (!($paged = get_query_var('page'))) {
          $paged = 1;
       }
    }
    query_posts("someargument=22&otherarguments=this&posts_per_page=$paged");
  3. creati54
    Member
    Posted 3 years ago #

    does this go in functions.php?

  4. vtxyzzy
    Member
    Posted 3 years ago #

    No, it would go in the template that is not honoring the pagination. Besides, it is not exact code that you should use. It is an example of a general nature. It may be correct or not depending on your theme.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags