How to put the option of "old posts" and "recent posts" in this code?

1

The maximum number of posts appearing by my blog code is 6, but I would like to put the options of "previous posts" and "recent posts", the way I had achieved it had gotten strange since there was not only thumbnail and the title, but the whole news. if you guys can help me here is the code.

  <?php  
  $args = array(
                'numberposts'     => 1,
                'offset'          => 0,
                'orderby'         => 'post_date',
                'order'           => 'DESC');

  $posts_array = get_posts( $args );

  foreach( $posts_array as $post ) :  setup_postdata($post); ?>
       <div class="destaque"><?php the_post_thumbnail( 'destaque-thumb' ); ?><br />
         <p style="font-size:10px;"><?php echo get_the_date(); ?></p>
         <p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p> 
     </div>
  <?php endforeach; ?>

 <?php  
 $args = array(
               'numberposts'     => 6,
               'offset'          => 1,
               'orderby'         => 'post_date',
               'order'           => 'DESC');

  $posts_array = get_posts( $args );

  foreach( $posts_array as $post ) :  setup_postdata($post); ?>
           <div class="noticia"><?php the_post_thumbnail( 'noticia-thumb' ); ?><br />
             <p style="font-size:8px;"><?php echo get_the_date(); ?></p>
             <p style="font-size:12px;">
                <a href="<?php the_permalink(); ?>">
                <?php the_title(); ?>
                </a>
             </p> 
           </div>
  <?php endforeach; ?>

about the code that shows the whole post is there:

'<div id="conteudo">
    <div id="artigos">

        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
            <div class="artigo">
                <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
                <p>Postado por <?php the_author() ?> em <?php the_time('d/M/Y') ?> -  <?php edit_post_link('(Editar)'); ?></p>
                <p><?php the_content(); ?></p>
            </div>            
        <?php endwhile?>
            <div class="navegacao">
                <div class="recentes"><?php next_posts_link('&laquo; Posts antigos') ?></div>
                <div class="anteriores"><?php previous_posts_link('Posts novos &raquo;') ?></div>
            </div>
        <?php else: ?>
            <div class="artigo">
                <h2>Nada Encontrado</h2>
                <p>Erro 404</p>
                <p>Nenhum post foi encontrado.</p>
            </div>            
        <?php endif; ?>

    </div>'
    
asked by anonymous 23.04.2015 / 17:02

0 answers