Skip Navigation

[Closed] I need help to show the products of a type of industry field selected

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.

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 1 year, 2 months ago.

Author
Posts
#2655853
Capture1.PNG
Capture2-.PNG
Capture3.PNG
Capture4.PNG
Capture5.PNG

Hello, I have some products, and one of their fields is "Type of Industry." I will create a page for each industry, and I want that on the page, the products with the industry selected show.

I created a view post type of the products and a view for the industries.

I'll leave some screenshots and please let me know if it's clear or If you need more information.

Thank you!

#2655947

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

You have a post type for products (let's call it "units", based on your screenshots).

You have a field for type of industry, with several possible values, and this field type is assigned to units.

"I will create a page for each industry, and I want that on the page, the products with the industry selected will show"

It sounds (and looks) to me like you would be better making industry type a custom taxonomy rather than a custom field.

It looks very much like you are essentially categorising the products, and that is what a taxonomy is intended for. (Queries based on taxonomies are also more performant than those based on custom fields.)

And if you created this "field" as a taxonomy, then you would automatically benefit from taxonomy archives without the need to create a page for every field value.

For example site.com/industria/medica/ would automatically display all of the products categorised as "medica".

See https://toolset.com/course-lesson/using-custom-fields-vs-taxonomy/

The topic ‘[Closed] I need help to show the products of a type of industry field selected’ is closed to new replies.