Woocommerce how to create one page for all categories at once, not for each category. With loopers maybe?

Hi there, I have two problems, one with creating page, 2nd with category description.

I have problems with understanding how to create category page with loopers, that will be universal mechanism to display all categories page. Using loopers I have created page for one category and it is working. I have more than 50 categories in a shop, and I believe that creating 50 archive pages is unnecessary.

My 2nd question is related to descriptions of categories. Is this possible to make those descriptions visible on category page? Of course combining it with my previous question.

Also it would be great to have all of this available to select in Cornerstone to use it like “Product image”, “Product gallery” etc.

Hello @tfstudiopl,

Thanks for writing to us.

I would suggest you please create the custom layout and set the conditions like this.

For the category descriptions, I would suggest you please add the Text element and insert this dynamic content code. {{dc:term:description}}

Hope it helps
Thanks

1 Like

Thank you very much for such a quick reply!
So I tried your solution and the second part works like a charm.

But first one doesn’t work. I selected products without any taxonomy conditions as a looper provider. Is that important in this case?
Also it partially worked only when I changed the priority of two archives - one for the regular shop page and one for the category page. Partially, because I can see the correct address in breadcrumbs homepage/shop/category

Any more ideas what I can do?

Hello @tfstudiopl,

Thanks for updating in! If you have 50 categories, you can create 1 custom Woo archive layout and apply it to all categories. We would love to check your site and how you have set it up. It would be nice if we can access the site. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

@ruenel thanks for writing in! I really appreciate your commitment! I’d rather learn something and learn the principles of how something works than get a ready-made solution.

Of course any kind of help is valuable for me :slight_smile:

@ruenel just in case, if you didn’t get the notification - secure note with all details is added to my previous post

Hello @tfstudiopl,

I checked your site settings it seems that the product category archive layout is rendering fine at the moment. I would suggest you please set the Looper provider as OFF and use only Lopper consumer since on the archive layout the default loop is working there.

By default, it will pull products from the category that you will access from the product category page.

example.com/product-category/CATEGORY-NAME/
Hope it helps
Thanks

@prakash_s I dida what you suggested, unfortunately it is not working as it should. On the left side is a panel with categories menu. When clicking on the category - header is rendering fine, there is category name, but always all products are showing.

Example: Round Mirrors (lustra okrągłe) should render only round mirrors but it shows all mirrors (there are four products turned on right now for testing, 3 of them are in a “lustra okragłe” category). Also - some of the categories are empty and still all items are showing when category is clicked.

Right now only solution that is working is to create category archive template and do it for all categories separately (I have 50 categories approx.). I think there is easier way to achieve that.

My current solution for mine problem is that: I have assigned category archive page that is working with one category to all other categories. It’s not a neat solution, but is working. I would love to know how to do it correctly, because I am sure that my idea is just workaround.

Hello @tfstudiopl,

You will have to set the priority of the layout to -5.

If you want to display all the categories, you can use a normal page or edit the layout assigned as your Shop index and use the Terms element to display the Product Categories.

Best Regards.

Thank for your suggestion. The terms element is looking promising for me, but I don’t need it right now.

I can see that something was changed and nothing is working as it should.

Your solution with changing priority to -5 did nothing. After inspecting those settings I saw that my conditions (50 product categories) were missing and there’s one condition - product taxonomy and category as on your screenshot.

I am trying to return to my previous settings. When I wrote that “everything is working now” I did this by changing priority and other settings randomly, because nothing was working like it was described here or on some forum posts.

I can see that priority was changed and I don’t remember what I set before. Although it was not perfect - it was working close enough. I had working solution with not so perfect method, and right now I have nothing working as it should.

I can see that this is not working as it should because I created two WC Archive layouts - one for shop main page and other for categories with few minor differencies and right now I can see only shop main page layout everywhere.

After creating separate conditions for all 50 product categories it works as before.

Thank you for your time and effort, I can see that there are different ways to achieve the same result when nothing works as it should :slight_smile:

I will definitely keep the Terms element in the back of my mind, thanks for the inspiration.

For me the topic is solved

Regards, Marcin

You are most welcome, Marcin.
We really appreciate for letting us know that this thread is resolved.