older posts not showing
-
Hi, I’m trying to transform twenty thirteen into a custom template. First, I tried to custom an external static page but I Haven’t the full avantage. So I return to this template to have a custom and personal presentation in grid based with my code for the older external site, but when I’m using the pagination, I’ve got the same posts displayed. I know that’s the debut of my code which is wrong, but I don’t know how to change it. How can I do this ? Here is my code, thanks a lot :
<?php define( 'WP_USE_THEMES', false ); get_header(); ?> <div id="articles"> <?php $compteur=0; echo '<div class="tableau">'; echo '<div class="colonnes">'; $posts = get_posts('numberposts=10&order=DESC&orderby=post_date'); foreach ($posts as $post) { setup_postdata( $post ); echo '<div class="col">' . "\n"; echo '<div class="img-crop">'; if ( has_post_thumbnail() ) { echo '<a href='.post_permalink($ID).'>'; $image_src = wp_get_attachment_image_src( get_post_thumbnail_id(),’thumbnail’ ); echo '<img src="' . $image_src[0] . '">'; } echo '</a>'; echo '</div>'; echo '<br/>'; echo '<div class="date">'; echo the_time('j F Y'); echo "</div>"; echo '<div class="title">'; echo the_title(); echo "</div>"; echo '<div class="excerpt">'; echo the_excerpt(); echo "</div>"; echo "</div>"; $compteur++; if ($compteur==3) { echo "</div>"; echo '<div class="colonnes">'; $compteur=0; } } echo "</div /></div>" ; ?> </div> <?php twentythirteen_paging_nav(); ?> <?php get_sidebar(); ?> <?php get_footer(); ?>
- The topic ‘older posts not showing’ is closed to new replies.