eCommerce Webstie with WordPress and Woocommerce
Solved with Widget: Woocommerce widget products categories will help you. It is in Widgets menu
Solved without Widget:
1. <!--?php echo do_shortcode('[products orderby="category" order="desc"]') ?-->
or
By the below way you can manage how things display.
1. <!--?php
2. $args=array(
3. 'post_type' =--> 'products',
4. 'orderby' => "category",
5. 'order' => ASC,
6. 'caller_get_posts'=> 1
7. );
8. $my_query = null;
9. $my_query = new WP_Query($args);
10. if( $my_query->have_posts() ) {
11. echo '' . $type .'';
12. while ($my_query->have_posts()) : $my_query->the_post(); ?>
13.
14.
15. <ul>
16.
17. <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><!--?php the_title(); ?--></a></li>
18.
19.
20. <li><!--?php the_excerpt() ?--></li>
21.
22. </ul>
23.
24. <!--?php
25. endwhile;
26. } //if ($my_query)
27. wp_reset_query(); // Restore global post data stomped by the_post().
28. ?-->`