Advertisement
cidus

Untitled

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