The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

[resolved] Pagination (3 posts)

  1. arturocivit
    Posted 3 years ago #

    Hi everybody, having a problem with the pagination, I have the following loop:

    <?php query_posts('cat=5&offset=0&order=DSC&showposts=5'); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <div id="FeatPropTitles"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>" class="FeatLinkTitle"><b><?php the_title(); ?></b></a></div>
    <small>Featured on <?php the_time('F jS, Y') ?><!-- | <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> --></small>
    <br />
    <img src="<?php echo get_post_meta($post->ID, 'FeatImage', true); ?>" width="250" height="164" border="0" hspace="5" vspace="5" align="left">
    <div style="line-height:22px; text-align: justify;"><?php echo get_excerpt(); ?></div>
    <br />
    <div><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><img src="<?php print IMAGES; ?>/MoreInfoPhotosBtn.png" width="394" height="32" border="0"></a></div>
    <br /><br /><br /><br />
    <?php endwhile; endif; ?>
    <?php previous_posts_link(); ?> | <?php next_posts_link(); ?>

    But if you go here: http://goo.gl/yo3Ha and click on next page at bottom it is loading the exact same posts, what do you guys think it is wrong here?


  2. Michael
    Forum Moderator
    Posted 3 years ago #

    another case of a custom query without the 'paged' parameter:


    <?php query_posts('cat=5&order=DSC&showposts=5&paged='.get_query_var('paged')); ?>
  3. arturocivit
    Posted 3 years ago #

    Thank you so much, sorry about that paged parameter, thanks so much!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.