Skip Navigation

[Resolved] WooCommerce Archives – Using Categories instead of Products

This support ticket is created 4 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by kaiD 4 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1559743

Tell us what you are trying to do?
Build a WooCommerce Archive Page on which the Product Categories are listed instead of the products

Is there any documentation that you are following?
I'm trying to follow the instructions of Christian here: https://toolset.com/forums/topic/woocommerce-archives-list-categories-instead-of-products/

Problem: Christian said: "if you do not want to display the products, you can delete the WordPress Archive block, leaving only the View in the block editor."
If i delete the Archive Block it comes back a few seconds after with this message: "The Loop Output was recreated because it is required by the WordPress Archive."

Question: How am i able replace the WordPress Archive block and using a view via shortcode (like Christian recommended)?

#1560385

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kai,

Thank you for getting in touch.

Christian is correct that you can remove the block. However you can try leaving the loop empty and then add the view block below the loop.

If the loop is empty then it shouldn't display anything on the frontend. In the Block editor the loop block is required for the archive to work so you wouldn't be able to delete it completely but you can just leave it empty.

Thanks,
Shane

#1561033
FireShot Capture 001 - Umweltfreundliche Verpackungen - dymafol-verpackungen.de_ - test.dymafol-verpackungen.de.png

Hi Shane,

thanks for the reply.
I'm getting a little bit confused. You said: "Christian is correct that you CAN remove the block". A litte bit below you're saying: "In the Block editor the loop block is required for the archive to work so you wouldn't be able to delete it completely."

If i understand it right, it is not possible to delete the archive loop block.
So i've left it empty like recommended. You are right, if i do so it doesn't display anything on the front end.

Two Issues with that:
- Even if it shows nothing there is a big space between bottom and the last info i inserted manually. How am i able to reduce that?
- Also there is the sorting info on the top which i don't need. How am i able to disable it?

See screenshot for better understanding.
If it helps i can give you access to the site.

I really appreciate your help because at the moment iḿ working on a clients project and running out of time. Thanks a lot.

Kai

#1561553

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Kai,

- Even if it shows nothing there is a big space between bottom and the last info i inserted manually. How am i able to reduce that?

This is expected because the loop is essentially there but empty. What you will need to do is to use CSS to hide the loop on the frontend so there isn't a gap.

What You can do is to send me a link to the page so that I can provide the css.

- Also there is the sorting info on the top which i don't need. How am i able to disable it?

Given that it is a Woocommerce shop page essentially then you should be able to use this hook below to remove it.

remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 10 );

Please let me know if this helps.
Thanks,
Shane

#1562395

Hi Shane,

i'm working with Astra Pro and i've just realized that there is a way to work with hooks. So i'm trying to combine the astra woocommere functions with toolset to get to the pont.

Thanks for your help.
Are you able to say when the taxonomy views comes to blocks?