How to use a template theme to show category Woocommerce products?

In this tutorial we’ll learn how to display products of a ctegory in template theme page. Fortunatley woocommerce comes with a number of shortcodes which could help us achieve this. Note that WooCommerce already creates category pages, but this shortcode is useful if you want to setup a special set of products without using the widgetized page template and widgets.

First of all we need to create a category. So i’ve created a new category named ‘category1′ having slug ‘category-1′.

woocommerceNow i’m going to add some products to this category.

woocommerceAs you can see i’ve assigned some products to the newly created category.

Now we need to create a template theme page. To do this go to add new section under pages and add a new page. So, i’ve created a new page and named it test.

You can also change the page template here:

woocommerceNow to show category1’s products to this page add the following short code into the page and hit create/update.

[product_category category="category-1"]

Replace the ‘category-1′ with your category slug.

woocommerceNow go to front end and open the newly created page. Here you can see the product of category being displayed.

Waqas

I hope you enjoy reading this blog post. If you want my team to do WooCommerce Maintenance for you, click here.

Leave a Comment

Your email address will not be published. Required fields are marked *