Posted By

alanyoshida on 09/02/15


Tagged

wordpress


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vikasgupta


Wordpress Loop - WP_Query


 / Published in: PHP
 

Wordpress Loop - WP_Query

  1. <!-- QUERY PERSONALIZADA -->
  2. <?php
  3. // The Query
  4. $the_query = new WP_Query( $args );
  5. // The Loop
  6. while ( $the_query->have_posts() ) : $the_query->the_post();
  7. setup_postdata($post);
  8. echo '<li>';
  9. the_title();
  10. echo '</li>';
  11. endwhile;
  12. // Reset Post Data
  13. wp_reset_postdata();
  14. ?>

Report this snippet  

You need to login to post a comment.