Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/05/2012, 18:56
lobos1981
 
Fecha de Ingreso: abril-2011
Ubicación: Colombia
Mensajes: 59
Antigüedad: 13 años
Puntos: 19
Respuesta: Agregar un div cada 4 post

Bueno. Inicio.. de la idea de que solo tienes 12 post; entonces este código te serviría

Código PHP:
Ver original
  1. <div style="background-color:blue;">
  2. <?php query_posts('showposts=4'); ?>
  3. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  4. <h2><?php the_title(); ?></h2>
  5. Posted on <?php the_time('F jS, Y') ?> in <?php the_category(', '); ?>
  6. <?php endwhile; endif; ?></div>
  7.  
  8. <div style="background-color:red;">
  9. <?php query_posts('showposts=4&offset=4'); ?>
  10. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  11. <h2><?php the_title(); ?></h2>
  12. Posted on <?php the_time('F jS, Y') ?> in <?php the_category(', '); ?>
  13. <?php endwhile; endif; ?></div>
  14.  
  15. <div style="background-color:blue;">
  16. <?php query_posts('showposts=4&offset=8'); ?>
  17. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  18. <h2><?php the_title(); ?></h2>
  19. Posted on <?php the_time('F jS, Y') ?> in <?php the_category(', '); ?>
  20. <?php endwhile; endif; ?></div>