WordPress.org

Forums

WooCommerce - excelling eCommerce
How to show all of Woocommerce Product Categories in a single page? (5 posts)

  1. sumonbdinfo
    Member
    Posted 1 year ago #

    Hi,
    I am creating an eCommerce Webstie with WordPress and Woocommerce. I want to create a Products page and on this page will show all of the Woocommerce Product categories one by one. I don't know how to do it.

    Can anyone please help me about this? I really need to fix this things clear!

    http://wordpress.org/plugins/woocommerce/

  2. sumonbdinfo
    Member
    Posted 1 year ago #

    Is there anyone who can help me?

  3. alezander
    Member
    Posted 1 year ago #

    Woocommerce widget products categories will help you.
    It is in Widgets menu

  4. sumonbdinfo
    Member
    Posted 1 year ago #

    HI,
    Thank you for reply me. But, I don't want to show it with Widget. I want to show it into a page. How may I able to do that?

  5. WebbleWabble
    Member
    Posted 10 months ago #

    sumonbdinfo,
    this should work for you
    <?php echo do_shortcode('[products orderby="category" order="desc"]') ?>
    or
    `<?php
    $args=array(
    'post_type' => 'products',
    'orderby' => "category",
    'order' => ASC,
    'caller_get_posts'=> 1
    );
    $my_query = null;
    $my_query = new WP_Query($args);
    if( $my_query->have_posts() ) {
    echo '' . $type .'';
    while ($my_query->have_posts()) : $my_query->the_post(); ?>

    <ul>
    <li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>
    <li><?php the_excerpt() ?></li>
    </ul>
    <?php
    endwhile;
    } //if ($my_query)
    wp_reset_query(); // Restore global post data stomped by the_post().
    ?>`
    the first example is off of woocommerce site. The second way you will have more control over how things display you can also call in the thumbnail by using by <?php the_post_thumbnail(); ?> You will want to set the size of the thumbnail to fit what you are looking for.

    Hope this helps

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic