Advertisement
cidus

Untitled

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