• martisim

    (@martisim)


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter martisim

    (@martisim)

    <?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; ?>
    Thread Starter martisim

    (@martisim)

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘pagenavi not working, page 1 of 0 displayed’ is closed to new replies.