Skip to content

I’m currently in the early stages of building a custom WooCommerce website and I spent this evening tearing my hair out because my theme wouldn’t display subcategories.

WooCommerce Subcategory settings in the Customiser.

WooCommerce Subcategory settings in the Customiser

Despite having the Category Display set to Show Subcategories in the Theme Customiser the category archive was showing the single products instead.

Switching back to the default Twenty Seventeen theme it worked as normal so the problem could be isolated to my theme files.

After a lot of frantic Googling I found a lot of people had the same problem but no one had posted a solution (due it being a problem with everyone’s individual themes rather than WooCommerce itself).

In the end it turns out I’d simply forgotten to actually declare WooCommerce support for my theme!

If you’re having the same problem simply remember to add the following line to your functions.php file:

add_theme_support( 'woocommerce' );

I hope that helps!

Get helpful advice and articles into your inbox once per month (plus a free website MOT guide) with the PJWD newsletter.

Related Articles

Four big shifts in web development over the last 5 years

29th May 2019

It’s been an interesting five years since I set up Paul Jardine Web Design and so much has changed! Here I share some of my thoughts on the big industry changes that have unfolded since 2014.

Read this blog

Setting up individual local PHP development environments using WAMP

21st August 2017

A tutorial for developers to learn how to set up local PHP development environments for building your websites using WAMP server.

Read this blog
View all articles