Forums › Forums › Search & Filter Pro › Add different search results to different product categories
Tagged: product categories
- This topic has 9 replies, 2 voices, and was last updated 9 years ago by
Trevor.
-
Anonymous(Private) March 9, 2017 at 11:29 pm #95854
Hi there,
I am looking to have different search results for different product categories, I am using woocommerce. I havent been able to successfully do this because in the widget area, it only lets me select categories, not product categories.
Is there a way around this?
Thanks
KristinTrevor(Private) March 10, 2017 at 9:04 am #95898Textual terms attached to posts (posts, custom post types, media, pages etc) are actually Taxonomies. In WordPress, there are two ‘special’ taxonomies that ship attached to normal posts named by WordPress (confusingly) as Categories and Tags. They are, in reality, taxonomies. Any other categories (such as product categories) are added by the developer or by plugins and are taxonomies.
So, if you are referring to the Form UI where you drag and drop the form elements, product categories will be found in the Taxonomy form element.
Anonymous(Private) March 10, 2017 at 11:05 am #95921Thanks Trevor, I have added the “tag” taxonomy from the UI Form and excluded some terms from it, to one product category (my business is invitations, so this category is weddings). Then added that form to a sidebar widget and all was good.
I was then looking to create a 2nd UI form with a tag taxonomy and have terms excluded from that, for use with a different product category (birthdays) and that was all good. But I don’t know how to make this 2nd UI form only display in the birthday product category and the first UI form display on the wedding product category.
If I added the 2 forms to the same side bar widget they would display together, so if I create a new side bar widget, I don’t know how to include or exclude product categories.
Thanks.
Trevor(Private) March 13, 2017 at 3:20 pm #96311OK.
I took a look at those pages and the Categories that you have. Let us firstly look the Product Categories.
You have the following parents categories:
Invitations
Printed Stationary
DIY
BonbonniereThen in Tags you have ‘groups’ of tags:
Shape
Style
Theme
Colours
EmbellishmentsThere may be more to add before you are finished.
What you should have instead (in addition to) is a separate custom taxonomy (Category and Tag are just fancy names for what are just taxonomies) for each of these (so that is 9 Custom Taxonomies). You can create new custom taxonomies for Products using CPT UI, and use the Taxonomy Switcher plugin (which, when you are done you can remove) to move the different classes of categories/tags into the new taxonomies. Then, in the form, remove the tag fields and replace them with these new taxonomy fields. Make sure that when you set up the taxonomies, allow them to be hierarchical (it is an option). Also make sure to move parents AND children at the same time.
-
AuthorPosts