page 2 shows same entries as page 1
-
Hi friends
I trying to make the homepage of my blog paged, but the 2nd page shows the same entries as the first page. Does anyone have an idea, where this comes from?
here’s my query:
<?php if (have_posts()) : ?> <?php $header_query = new WP_Query( 'post_type=post&orderby=date&order=DESC&showposts=1' ); ?> <?php while ( $header_query->have_posts() ) : $header_query->the_post(); ?> <?php $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?> <div class="home-header" style="background:url(<?php echo $url; ?>) center center; background-size:cover;"> <div class="home-field"> <h3><?php the_time( get_option( 'date_format' ) ); ?></h3> <h3 class="kategorien"><?php the_category(' | '); ?></h3> <div class="clear"></div> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> </div><!-- end home-field --> </div><!-- end home-header --> <?php endwhile; ?> <div id="main" class="home"> <div class="teaserposts"> <!-- Zeige die Posts als Liste --> <?php $list_query = new WP_Query( 'post_type=post&orderby=date&order=DESC&offset=1&paged=paged' ); ?> <?php while ( $list_query->have_posts() ) : $list_query->the_post(); ?> <div class="teaserpost"> <div class="teaser-bild"> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('quadrat'); ?></a> </div><!-- end teaser-bild --> <div class="teaser-text"> <h3><?php the_time( get_option( 'date_format' ) ); ?></h3> <h3 class="kategorien"><?php the_category(' | '); ?></h3> <div class="clear"></div> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> </div><!-- end teaser-text --> <div class="clear"></div> </div><!-- end teaserpost --> <?php endwhile; ?> <div class="navigation"> <div class="alignleft nav-links" ><?php previous_posts_link('« Previous Entries') ?></div> <div class="alignright nav-rechts"><?php next_posts_link('Next Entries »','') ?></div> </div><!-- end navigation --> <?php rewind_posts(); ?> </div><!-- end teaserposts --> <?php endif;?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘page 2 shows same entries as page 1’ is closed to new replies.