The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress Paging Issues

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #30692

    Hi I am currently working on a new theme for my site and have run into a problem where the query I am running on a static page is not allowing paging.

    here is the query i am running, the idea being that the page will show 6 items per page with in the category of blog which is represented in a global variable

      ID, 'thumb', true); ?>
      $comments = $post->comment_count;
      if( $comments && $comments == 1 ) {
      $comment = '1 Comment';
      } elseif ( $comments ) {
      $comment = $comments.' Comments';
      } else {
      $comment = 'No Comments';
    • " title=""><?php the_title(); ?>,

    this is the code i am using to create the paging links standard wordpress links

    when clicking on the next link which should show the 7th entry under blog the url changes to page 2 however the blog entries remain the same as page 1


    I am having the exact same problem, url changes but nothing else :(


    Your query is what is causing problems here. Queries don’t get along with pagination without a little help:


    ahh thks dud ur a life saver, just so im understanding this the $paged var holds the current page number?

    so say i wished to alter the format of my paging to represent “PAGE: 1 of 20” is there a query variable for max pages? or would i have to generate it via the query


    Sort of. It’s a little awkward because if paged = 1, you’re actually on page 2.

    So for example, I have it set up so that the home page shows things differently than the rest of the pages, so in my loop I have something to the effect of:

    if($paged == 0) { // home page } else { // blah }
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Back End’ is closed to new topics and replies.