Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array(
- 'post_type' => 'product',
- 'stock' => 1,
- 'posts_per_page' => 4,
- 'orderby' => 'date',
- 'order' => 'DESC',
- );
- $loop = new WP_Query( $args );
- while ( $loop->have_posts() ) :
- $loop->the_post();
- global $product;
- ?>
- <div class="span3">
- <li>
- <!-- HTML anchor and other stuff goes here -->
- </li>
- </div>
- <?php
- endwhile;
- wp_reset_query();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement