Display WooCommerce Categories on Home Page using Code

This entry is part 4 of 6 in the series WooCommerce Development

In this post we will learn How to display woocommerce categories on home page using Code. Products on your e-commerce store can be categorized with Woo Product Categories. Its a nice idea to show your product categories on home page, so if you have a very large store with lots of products, your potential customers can easily get a grasp about what kind of products you are selling. I will show you how we can display both Parent and Child categories together with a nice looking Bootstrap Card Block.

Our code will show categories like below :

12th Board Commerce, Company Secretary, Chartered Accountant and Competitve Exams are Parent Product categories and CS Executive, CS Foundation, CS Professional are the child categories of Company Secretary. You can see child categories for all the Parent Categories except ’12th Board Commerce’ because I did not create the child categories for it. Clicking on “View All Courses” will take you the courses of Parent Categores and clicking on each Child category will take you to all courses available for that Child Category.

Please let me know in comments below, if you face any issues while implementing this in your code. Comment the topics you want to see on ProjectDebug. I will be happy to make them for you.

Happy Coding…!

Series Navigation<< How to Add Author to WooCommerce Product- Part 2Remove Grouped Product Price in WooCommerce >>