Advertisement
cidus

Untitled

Jul 18th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <ul class="products">
  2. <?php
  3. $args = array(
  4. 'post_type' => 'product',
  5. 'category_name' => 'livros',
  6. );
  7. $loop = new WP_Query( $args );
  8. if ( $loop->have_posts() ) {
  9. while ( $loop->have_posts() ) : $loop->the_post();
  10. wc_get_template_part( 'content', 'product' );
  11. endwhile;
  12. } else {
  13. echo __( 'No products found' );
  14. }
  15. wp_reset_postdata();
  16. ?>
  17. </ul><!--/.products-->
  18.  
  19. <ul class="products">
  20. <?php
  21. $args = array(
  22. 'post_type' => 'product',
  23. 'category_name' => 'vinil',
  24. );
  25. $loop = new WP_Query( $args );
  26. if ( $loop->have_posts() ) {
  27. while ( $loop->have_posts() ) : $loop->the_post();
  28. wc_get_template_part( 'content', 'product' );
  29. endwhile;
  30. } else {
  31. echo __( 'No products found' );
  32. }
  33. wp_reset_postdata();
  34. ?>
  35. </ul><!--/.products-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement