Skip Navigation

[Resolved] Show toolset custom field in product_category shortcode results

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to add a custom field in the output of the WooCommerce product_category shortcode.

Solution: There's not an easy way to customize this shortcode in Toolset. Instead, you can create a View of Products, filtered by Product Category term, set by a shortcode attribute. Then add your custom field in the Loop editor along with the post title with link, featured image, price, and add to cart button.

Relevant Documentation:
https://toolset.com/documentation/user-guides/getting-started-woocommerce-views/

This support ticket is created 5 years, 11 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 2 replies, has 2 voices.

Last updated by christopherO-2 5 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1149366

How do I show the show a Toolset custom product field in the WooCommerce [product_category category="... shortcode results?

I have been reading around on the Toolset site but can't find it:
https://toolset.com/documentation/toolset-training-course/toolset-shortcodes/

I was able to add the field to the default products page here:
hidden link

Here is the page I'm working on:
hidden link

Thanks!

#1149433

There's actually not an easy way to modify the output of that shortcode in Toolset, it's completely controlled in WooCommerce. Instead, you could create a View of Products filtered by Product Category term, set by a shortcode attribute "category". Insert the custom field into the loop of that View along with the Post title with Link, Featured image, Price, and Add to Cart button. Insert this View in your template instead of the product_category shortcode.

#1149445

My issue is resolved now. Thank you!