ThemeShaper Forums » Thematic

[closed]

Post Pagination On Page Template Not Working

(5 posts)
  • Started 3 years ago by dhales
  • Latest reply from helgatheviking
  • This topic is resolved
  1. dhales
    Member

    Greetings,

    I am trying to setup post pagination, preferably using the wp-pagenavi plugin. I created a blog page using a custom page template on my site. I want this page have the post pagination for all of my posts.

    I have a read quite a bit about this and it appears that I need a new custom loop, though I'm not sure. Currently I have been unable to get anything to show up. I can see the div is there using firebug, but it's empty.

    Any help would be greatly appreciated!

    Warm Regards,
    Derek

    Posted 3 years ago #
  2. dhales
    Member

    Ironically enough, even though this problem has plagued me for 3 days I found a fix within an hour of posting this...anyway, here's my solution.

    I was correct, I did need to setup a custom loop.

    <?php
    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    $wp_query->query('showposts=5'.'&paged='.$paged);
    ?>

    <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>

    Once I modified my loop to this (I had something similar before) it was simply a matter of adding back in the default thematic below navigation hook. Looks perfect now.

    Posted 3 years ago #
  3. i was facing the same issue... it really helped me.. thanks a lot for ur help :)

    Posted 3 years ago #
  4. adegbitewa
    Member

    how do I use this code to apply to pulling posts from a specific category? really need help on this since I'm PHP illiterate. Thanks

    Posted 2 years ago #
  5. adegbitewa, see the codex:
    http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.