Hi everyone,
I would like to create a WooCommerce archive page for categories, replacing the standard https://aggroupshop.it/negozio/ but inside the layout builder I see that there is the possibility to create archives only with products. Quite right?
Hello @scenaryo,
Thanks for writing to us.
Yes, you can create the WC archive category page for that you need to select the “Type” as “WC Archive” when you are creating your archive layout.
Pro—>Layout–>Click on the Plus icon to create —>select the type as WC Archive
In case if you haven’t seen the layout builder tutorial please have a look at it.
Thanks
Hi @prakash_s,
The problem is that in the query builder I only see the products (see screenshot) and not the categories, so I can create a looper that only manages a product grid.
Instead I would like to create a category archive page … what should I do?
Hey, @scenaryo…thanks for writing in! As @prakash_s mentioned, to create a layout for a Product Category, you must first setup a Layout in the Layout Builder and set its Type to WC Archive. After you have done this, you will then be in the Builder Interface, and you can begin editing a layout for your main shop or an archive page. I’ve just taken one of the default Starter Templates and messed around with the styling a bit in my example below and replaced the original title with All {{dc:term:title}}
, which will pull through the name of the archive you are currently viewing:
There is no need to specify a Looper when setting up an archive page as the WP Query is already provided by the archival context. However, to see things properly, you must do a couple things:
- Setup a preview context for the backend to see what’s going on.
- Setup an assignment so that your Layout is actually applied to the frontend of your site…otherwise it won’t do anything.
To setup what the Live Preview is seeing in the Builder, go to the Preview Manager and select Product Category (or whichever taxonomy you wish) from the first dropdown, and then select the Product Category you want from the second dropdown (in this case, I’ve selected Music):
Next, we need to assign our Layout to the frontend somehow. To do this, go to Settings → Assignments → Conditions and click on the picker to reveal the popup. Now, technically, if you just made a layout and assigned it to your Shop like the following screenshot, this would technically work:
However, be aware that this means this archival Layout will be used for all archive layouts throughout your shop. So, you would likely need to make some updates to some things like have a variable title and whatnot as “All __________” wouldn’t make much sense on the primary index. However, since you are wanting this to show up for specific Product archives, you could do something like this:
So from this screenshot, you can see that we’re assigning this Layout to our Product Category with a title of Music, which when we preview it on the frontend, will just show us what we’ve been seeing in our Live Preview since we assigned a preview context in the Builder:
Hopefully this helps to point you in the right direction. Cheers!
Hi @kory,
Thank you so much for your flawless tutorial
I followed it to the letter and it works perfectly for all the various categories (https://aggroupshop.it/categoria-prodotto/prodotti-estetici/); Unfortunately, however, I would also like to manage the main page of the Shop (https://aggroupshop.it/negozio/), making sure that the main categories are shown. It’s possible?
Hey, @scenaryo! Glad that helped…to manage your Shop, you will either need to setup your template in a way that it can be assigned to all archives / the main Shop index, or you can create a new Layout to be used strictly for your main Shop index and assign it to that appropriate context. The choice really comes down to how you want to manage it. Cheers!
@scenaryo, remember from above that the Preview Manager is not the same as assigning a layout to be used on your website, it is only used to set the preview context while you are in the Builder.
Please review my comment above again for the breakdown between the two and how to use them, and I would also recommend reading through / watching the following resources from our documentation / YouTube channel as it should clear up any confusion between the two:
- https://theme.co/docs/layout-builder-overview
- https://theme.co/docs/conditions-and-assignments
- https://theme.co/docs/preview-manager
- https://theme.co/docs/dynamic-content-and-loopers
Hopefully that helps to point you in the right direction. Cheers!
Hi @kory,
I’ve tried and tried these days, reading the docs and watching the videos but I just can’t.
I think I’ve done everything correctly (assigning the layout to the main page of the Shop) but it still doesn’t work.
https://aggroupshop.it/negozio/
While for the pages of the other sub-categories it is ok:
Hey,
I’m having the same exact problem as @scenaryo, have all the conditions assigned and it is not making any changes to the shop page. Should we be doing changes to woocommerce settings?
Cheers
I would like to request you create a new thread to share the credentials in the secure note to investigate your setting further, including:
– WordPress Site URL & Login URL
– Specific Layout where you are creating the
– WordPress Admin username/password
To create a secure note, click the key icon underneath any of your posts.
I would also suggest you go through the documentation on the Condition & Assignment here: https://theme.co/docs/conditions-and-assignments
Thanks
Hi,
I am also sending my site credentials with Secure Note asking you for support for resolution.
The layout to be analyzed is called “Shop”.
Thanks in advance
Hello @scenaryo,
You have two WC archive layout.
The “Shop” layout is assigned to your shop index
It is not working because it does not have any Looper Provider and Looper Consumer. You need to add them first before they will work in your preview.
The “Shop(1)” layout works and displays product items in the preview because it has a looper provider all set up in the page. The condition is set to display the “Product Category: Aesthetic Products”.
If you want to use the “Shop (1)” layout for your shop index, simply add another Condition group and use “Shop” in your condition:
Hope this helps.
Hi,
I think I have not been able to explain in these 9 days, I will try to be clearer because it is really strange to me that my request was not understood.
I don’t want to view the products, but the images of the categories.
As I wrote at the beginning of the topic, 9 days ago: “I see that there is the possibility to create archives only with products”.
Let me explain even better: if I go to the WooCommerce settings and choose to show categories I don’t see anything.
I attach additional screenshots that I hope will help you better understand the request, thanks
Hello @scenaryo,
You are seeing the products in your custom shop index because you have created a custom layout that displays the product. Your Looper Provider returns the recent product items. To display the product categories, you will need to create another custom shop index that uses “All Terms” Looper Provider and in your Looper Consumer, you will have a different set of elements to display the category image and the category names.
Hope this makes sense.
Hi @ruenel,
Now it’s all clear; I thought it would be enough to change the layout created automatically by the template.
Perfect then, I’ll do my best. Thank you
Hi @scenaryo,
You’re welcome and it’s our pleasure to help you. If you have any other concerns regarding our theme features, feel free to reach us.
Thank you.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.