Para crear un loop de wordpress


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php query_posts(array('category_name' => 'qwerty', 'posts_per_page' => 5));
  2. if (have_posts()): while(have_posts()): the_post(): ?>
  3.  
  4. // el contenido
  5.  
  6. <?php else: ?>
  7. no existe nada
  8. <?php endif; endwhile; ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.