Forums › Forums › Search & Filter Pro › Add a filter for tags
Tagged: tags
- This topic has 17 replies, 2 voices, and was last updated 5 years, 11 months ago by
Trevor.
-
Anonymous(Private) June 3, 2019 at 10:49 am #213058
I have my taxonomy filter working great but I need to add an additional one for tags but only the tags that apply to my custom post type.
As it stands, the tags filter lists every tag on the site and NOT just the 6 related to the custom post type so its liek the issue I had with taxonomies where the Taxonomy Switcher plugin resolved that, is there a similar plugin for tags?
In addition., the front end search form is set to multi select and lists (1) next to one of these but when selecting that, it doesn’t actually filter anything and just displays all my CPT’s.
Im sure its just a config issue but can you assist?
Anonymous(Private) June 3, 2019 at 11:02 am #213063In the CPT UI plugin, I have Tags (WP Core) ticked so I guess these are standard tags?
They don’t have to be like this, can you think of a better way of doing this? Ultimately the custom post types need to filter by taxonomy (which works fine) and tags, both of which need to be able to be assinged to a CPT via the GF front end form.
Trevor(Private) June 3, 2019 at 11:07 am #213065It would be better to add a Custom Taxonomy to that Post Type, which you can also label tags should you wish. Only the slug name needs to be different (for example, WooCommerce calls its tags Product Tags by label and Product_tag, I think, as their slug).
Have you added many, and are these particular terms use by Post also, or just by this new Custom post type (as there is a tool, Taxonomy Switcher, that allows you to switch the erms from Tags to your new Custom Taxonomy for tags)?
Anonymous(Private) June 3, 2019 at 11:24 am #213067Yes, that has done the trick ie/ removing the tags and adding another custom taxonomy. Thanks.
One thing is now I have 2 filters which are virtually identical other than using different taxonomies, I have an error that says ‘Error: There are 2 Search Forms set to use Post Type Archive display mode for the post type Businesses – you may only have 1’. Is this something I need to worry about?
I need 2 seperate ones to get 2 shortcodes to display 2 different filters.
Anonymous(Private) June 3, 2019 at 11:29 am #213073I need 2 filters, one filters by ‘index’ which has 4 options then the other is to filter by location which has 6 options.
The customer doesn’t want one form where you can filter by location or ‘index’ but that wouldnt make sense to me anyway, would that be more ‘normal’ to you?
Trevor(Private) June 3, 2019 at 11:33 am #213075That would be what I would do, have one form. If they are on different pages, you can use custom CSS to alternately hide the unwanted field. At least one class on the body tag should differ for each page.
Having two forms based on a single Post Type will likely cause issues and not work.
Anonymous(Private) June 3, 2019 at 12:00 pm #213086Ok, I can see that choosing X from one filter and Y from the other doesn’t give a true result for example if I want to view all businesses with index X in location Y it just displays all the CPT’s.
If I used one filter only as you say, could I perform a multi query filter like this?
-
AuthorPosts