Viewing 4 replies - 1 through 4 (of 4 total)
  • do you use a custom query on the blog page – without integrating the ‘paged’ parameter?

    http://codex.ww.wp.xz.cn/Class_Reference/WP_Query#Pagination_Parameters

    Thread Starter hazardous_waster

    (@hazardous_waster)

    .. sounds like I might be missing something then, this is problem bit of code I want to add pagination to, I’ve had a quick mess around and the first line and last time ‘<?php do_action(‘rt_before_the_loop’); ?>’ seem to bring up the pagination but not actually do anthing, so I wondering what the hell they are about!? … I also had a quick try of adding the paged query to little effect

    <?php do_action(‘rt_before_the_loop’); ?>
    <?php if(!is_archive()) { query_posts(‘cat=-39’); } ?>
    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

    <div <?php post_class() ?>>

    Stuff in here

    </div><!–end of .post_class –>

    <?php endwhile; ?>
    <?php do_action(‘rt_after_the_loop’); ?>

    try:

    <?php if(!is_archive()) { query_posts('cat=-39&paged='.get_query_var('paged')); } ?>

    or:

    <?php if(!is_archive()) { global $query_string; query_posts($query_string . '&cat=-39); } ?>

    however, this might depend on the full code of the template…

    Thread Starter hazardous_waster

    (@hazardous_waster)

    You beautiful beautiful man! That first one worked first time, copy – paste out of the box, fantastic … you are a life saver!!

    N

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Pagination issue’ is closed to new replies.