WordPress.org

Ready to get started?Download WordPress

Forums

Pagination not working Page2 same as index (1 post)

  1. CodyDalton
    Member
    Posted 4 years ago #

    I am using the wp-pagnavi plugin. I cannot figure out why my page 2 shows the same post as the first page.`get_header(); ?>

    <div id="main-content" class="clearfix">

    <div class="container">

    <div class="col-580 left">

    <?php

    query_posts( 'showposts=8' );

    if (have_posts()) :

    while (have_posts()) : the_post(); $category = get_the_category();

    ?>

    <div <?php post_class(); ?>>

    <div class="post-meta clearfix">

    <h3 class="post-title left">" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h3>

    <p class="post-info right">

    <?php the_time( 'l F j, Y' ) ?>

    </p>

    </div><!-- End post-meta -->

    <div class="post-box">

    <div class="post-content">

    <?php if( get_post_meta( $post->ID, "image_value", true ) ) : ?>

    <div class="post-image">

    " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php bloginfo( 'template_directory' ); ?>/timthumb.php?src=<?php echo get_post_meta( $post->ID, "image_value", true ); ?>&w=620&h=350&zc=1" alt="<?php the_title(); ?>" />

    </div>

    <?php endif; ?>

    <div class="post-intro">

    <?php the_content( '' ); ?>

    </div><!-- End post-intro -->

    </div><!-- End post-content -->

    <div class="post-footer clearfix">

    <div class="continue-reading">

    #more-<?php the_ID(); ?>" rel="bookmark" title="Continue Reading <?php the_title_attribute(); ?>">Continue Reading

    </div>

    <div class="category-menu">

    <div class="category clearfix">

    <div><span class="indicator"></span> <?php echo $category[0]->cat_name; ?></div>

    </div>

    <div class="dropdown">

    <ul class="cat-posts">

    <?php

    $posted = get_posts( "category=" . $category[0]->cat_ID );

    if( $posted ) :

    foreach( $posted as $post ) : setup_postdata( $posted );

    ?>

  2. " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?><span><?php the_time( ' F j, Y' ) ?></span>
  3. <?php

    endforeach;

    endif;

    ?>

    <li class="view-more">cat_ID ); ?>" class="view-more">View More »

    </div><!-- End dropdown -->

    </div><!-- End category -->

    </div><!-- End post-footer -->

    </div><!-- End post-box -->

    </div><!-- End post -->

    <?php

    endwhile;

    endif;

    ?>

    <?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); } ?>

    </div><!-- End col-580 (Left Column) -->

    <div class="col-340 right">

    <ul id="sidebar">

    <?php get_sidebar(); ?>

    <!-- End sidebar -->

    </div><!-- End col-340 (Right Column) -->

    </div><!-- End container -->

    </div><!-- End main-content -->

    <?php get_footer(); ?>

    `

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags