Guest User

Untitled

a guest
Oct 17th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <?php
  2. global $wp_query;
  3. /*
  4. * Most functions called in this page can be found in the wpsc_query.php file
  5. */
  6. ?>
  7. <?php $cat = $wp_query->tax_query->queries[0]['terms'][0]; ?>
  8. <div class="products-wrap">
  9. <div class="products-page">
  10. <?php $wpsc_query = new WP_Query('post_type=wpsc-product&posts_per_page=-1&wpsc_product_category='.$cat); ?>
  11. <?php print_r($wpsc_query->posts); ?>
  12. <?php $count = $wpsc_query->post_count; ?>
  13. <?php $post_numb = 1; ?>
  14. <?php while($wpsc_query->have_posts()): $wpsc_query->the_post(); ?>
  15. <?php the_title(); ?>
  16. <?php if(($post_numb%3 == 0)): ?>
  17. <?php echo 'test<br />'; ?>
  18. <?php elseif((($post_numb == $count) && ($post_numb%3 != 0))): ?>
  19. <?php echo 'test<br />'; ?>
  20. <?php else: ?>
  21. <?php ?>
  22. <?php endif; ?>
  23. <?php $post_numb++; ?>
  24. <?php endwhile; ?>
  25. </div></div>
Add Comment
Please, Sign In to add comment