WooCommerce / Layout Builder / Category pages

I have created 2 archive layouts for WooCommerce.

  1. Shop ( priority 5 )
  2. Category Pages ( priority 0 )

On the category layout page I have added the product element.

I’m currently having two issues with category page

  1. It doesn’t matter which category page I visit the page show all the products instead of the only the products for the specific category.
  2. If a category has no products but you visit the catgeroy page, rather than showing a message that their are no propducts available it shows the shop page.

Not sure if this is a bug or if I am missing a setting somewhere.

Thanks.

Hi @urchindesign,

Thanks for reaching out.
It will be very difficult to recognize the issue without investigating through the admin dashboard. Can you please provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Can you perhaps explain how to create a Woo shop page that follows the woocommerce settings for the loop.

i.e. I have an layout in the WooCommerce Archive Layout builder set to the shop page however in WooCommerce I have set the shop page to show the categories however my shop page shows all categories and sub categories.

Hi @urchindesign,

If you have set the Looper Provider to All Terms and Taxonomy to Product Categories, it will show all the product categories as it showing on your shop page. And it has been found that you are using the Text or Headline element to show the Product Category names, I would suggest the Terms element with the same Looper setting to get the linked Category names and also set the Exclude for Empty Terms.

Shop-Page-Layouts-Pro

Note: Unfortunately, the given credentials are not working. Can you please check and send it once again.

Thanks

I have updated the credentials. Spelt the username incorrectly.

I would also suggest that you guys either create documentation or create some videos as we’re kind of shooting in the dark.

What I want is for the shop page to get the WordPress loop based on the settings set up in the WooCommerce settings under Customize -> Appearance.

i.e. I have set the shop page to show categories but when I create the looper either my own way or by using a Terms element I get all categories and sub categories when I only want the categories.

I do know how to hide empty ones but that is irrelevant to my issue and for now I don’t want to hide the empty product categories as I only have a single product in the shop.

I have also tried using “Current Post Terms” combined with Product Categories and that also shows the categories and sub categories.

I am also, I presume, potentially going to run into the same problem where on the shop category pages I only want to show the sub categories.

Hi @urchindesign,

If I am understanding your point correctly, you are trying to show all the Categories in the Shop page and while clicked into any category it will show the sub-categories list under the specific category. If that is what you are trying to achieve, is a part of customization and beyond the scope of theme support.

I would suggest you hire a developer who can assist you to do the customization or you can avail of our newly launched service called One, where the customization questions are answered.

Thanks

This is default WordPress / WooCommerce it should not be a customization.

In WooCommerce in Appearance > WooCommerce we have the ability to set what we want to display in the shop.

I have set this to show the categories. In your default theme layouts for Woo if you then go to the shop page you see the categories.

In the same settings I have set sub categories to be shown on the category page so if you click the category in the shop page it opens a new page of the category and on that category page, based on the settings it shows the sub categories of the category. Again default woocommerce.

With the layout builder how do I show only the categories without the sub categories, as set in the woo settings, on the shop page.

This should be default stuff as I am using an archive page which should take on the settings from the Woo settings.

On a side note I am a PHP developer and before the layout builder I would custom code my own loayouts but the point of the layout builder is to speed things up and one would expect that the layout builder could handle standard woocommerce stuff but allow us to build the way the woo elements display.

Hi @urchindesign,

Sorry if my previous comment is confusing, I just wanted to tell you that this is not achievable through the Layout Builder. To show the sub-categories through the Layout Builder you may need to write the custom code which will take the category as an input and return the sub-categories. The following thread might be helpful on this.

Hope it helps.
Thanks

Is it possible to show only the top level categories without the sub categories with the layout builder or does this also require a custom filter?

Seems all seems like an over site. Archive pages should really work with the loop as set in the Woo Commerce settings.

Hi @urchindesign,

You can use the All Terms or Current Post Terms of the Looper Provider to get all the top-level Categories or the Categories related to the current post or page or product.

Screenshot-144- (1)

Hope it helps.
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.