WordPress.org

Ready to get started?Download WordPress

Forums

pagenavi not working, page 1 of 0 displayed (3 posts)

  1. martisim
    Member
    Posted 2 years ago #

    Right ive installed pageNavi and i cant get it to work, it keeps displaying "page 1 of 0" ive tried deactivating all of my other plugins with no such luck. After researching on various forums i found out it could be the way i am using query_posts. Here is my code in archive.php

    [Code moderated as per the Forum Rules. Please use the pastebin]

    What i want to know is am i using query_posts correctly? If not how can i rewrite the code so that pageNavi will work? cheers in advance for help.

  2. martisim
    Member
    Posted 2 years ago #

    <?php $firstClass ='topPost'; ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <div class="otherPostInner<?php echo $firstClass;?>">
    <?php $firstClass =""; ?>
    <?php if( get_the_post_thumbnail($post->ID) ) { ?><div class="postThumb"><?php the_post_thumbnail();?></div><?php } ?>
    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2><h4>Published: <?php the_date('l, F j, Y');?></h4>
    <?php the_excerpt(); ?></div><div class="clearer"></div>
    <?php endwhile; else: endif; ?>
    <?php query_posts('category_name='.get_the_title().'&post_status=publish,future');?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    <p><?php the_excerpt(); ?></p>
    <?php endwhile; else: endif; ?>
  3. martisim
    Member
    Posted 2 years ago #

    sorry thats the code (above), didnt know about using paste bin lol

Topic Closed

This topic has been closed to new replies.

About this Topic