Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <!-- WooCommerce New Products -->
  2. <ul class="products">
  3. <?php
  4. $args = array(
  5. 'post_type' => 'product',
  6. 'posts_per_page' => 4
  7. );
  8. $loop = new WP_Query( $args );
  9. if ( $loop->have_posts() ) {
  10. while ( $loop->have_posts() ) : $loop->the_post();
  11. woocommerce_get_template_part( 'content', 'product' );
  12. endwhile;
  13. } else {
  14. echo __( 'No products found' );
  15. }
  16. wp_reset_postdata();
  17. ?>
  18. </ul>
  19. <!-- WooCommerce New Products -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement