Skip Navigation

[Closed] Taxonomy archive invokes Woocommerce archive if associated with products

This support ticket is created 2 years, 10 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 6 replies, has 2 voices.

Last updated by Christian Cox 2 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#2094433

Tell us what you are trying to do?
I have created a taxonomy that applies to a variety of post types, including WC products, TEC Events, custom post types (representing different training options)
I am trying to create a taxonomy archive that will display all the posts for the taxonomy , regardless of the post type, i.e. display all training options on one page, e.g. hidden link. It works correctly in general, apart from the Woocommerce additions that totally overrides my layout settings. On the live site, we use Astra theme. Even though I have specified the astra settings for the archive, these are totally ignored and I'm given a sidebar, for a start.

On our staging site, hidden link I have switched to TwentyTwentytwo theme, to eliminate Astra as the culprit. The woocommerce elements are still present, and only disappear when I remove 'product' as on of the post types.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site? hidden link

#2094911

Hello, may I log into the staging site and adjust the archive settings to see the differences you've mentioned? Please provide login credentials in the private reply fields here so I can take a closer look.

#2095085
Screen Shot 2021-06-21 at 6.27.57 PM.png

Okay with Astra active, there is a theme option available in the Customizer for enabling or disabling the sidebar specifically in WooCommerce. I was able to disable the sidebar here and use the "Use theme settings" options in the archive to modify the display of the archive a bit. This gets a bit closer to what I think is your desired design, but I wanted to get your feedback now on the staging site. Can you tell me if the display is more like what you'd expect, or if there are additional elements added by WooCommerce that you would like to disable on this archive now?
hidden link

#2095319

Hi Christian,
I'm well aware of the Astra Settings. The Woocommerce sidebar is enabled in my customiser settings, because that is what I require for my Woocommerce page - products, categories etc. so, it cannot be disabled.

I have re-enabled Beaver themer, which inserts additional code in the introduction for the archive. apart from the sidebar, my issue is with the woocommerce header, results count & sorting options that have been inserted. I don't want any of this, as it is not relevant to my display. I was hoping to add filters of my choosing, that relate to the actual content.

This is not down to Astra, as it is there on the default theme too.

#2095899

apart from the sidebar, my issue is with the woocommerce header, results count & sorting options that have been inserted. I don't want any of this, as it is not relevant to my display.
Okay as I understand it these elements are built into the WooCommerce archive PHP template, and implemented in a way that Toolset does not directly control. I think one solution could be to use a PHP template override in a child theme. In a child of Twenty Twenty One, for example, you would copy the default archive.php template from the parent theme and place it in the child theme, then rename the file taxonomy-{taxonomy-slug}.php, i.e. taxonomy-course_gas.php or taxonomy-course_industry.php, to override the PHP template used for the corresponding taxonomy archive. That would override the WC archive PHP template applied by default when Product is a post type registered to a custom taxonomy. You could try something similar in a child theme of Astra, and see if it overrides the WC elements as expected. If not, please provide some screenshots showing the problems that you experience with the child theme PHP archive template override.

#2102115

I appreciate what you are saying, that this is built into the Woocommerce archive.php, but somehow, an archive template created using Beaver Themer doesn't have the same issue? (It has other issues, but this is not one of them!)

#2102209

I appreciate what you are saying, that this is built into the Woocommerce archive.php, but somehow, an archive template created using Beaver Themer doesn't have the same issue?
It sounds like you're asking me to speculate how or why the behavior is different with Beaver Themer templates, but I don't have any knowledge of their software so I can't provide a good answer to that question. I know that Toolset's templates work within the documented template hierarchy for WordPress and WooCommerce, and if the templates are not working as expected I can investigate those problems as bugs or compatibility issues. I'm not really qualified to answer questions about Beaver Themer's templating system. Or am I misunderstanding your question?

The topic ‘[Closed] Taxonomy archive invokes Woocommerce archive if associated with products’ is closed to new replies.