Forums › Forums › Search & Filter Pro › Get taxonomy term from post to filter query
Tagged: taxonomy
- This topic has 3 replies, 2 voices, and was last updated 5 years, 10 months ago by Trevor.
-
Trevor(Private) February 4, 2019 at 9:28 am #201064
Do you mean from the URL?
For example, say I have a taxonomy for car brands, and I am on the page for Honda, my URL might be:
mycarsite.com/brand/ford/
If:
#1 This page is a real WordPress taxonomy term archives page
#2 You have included the ‘Brand’ taxonomy as a field in your form
#3 You have, on the General Settings tab of the form design set (ON) the optionDetect defaults from current page
->Choose which kinds of pages S&F will try to do this on
->Tag, Category & Taxonomy Archives
It should work.
What the form cannot do, is, for example, if you set a single taxonomy term in the
Tags, Categories & Taxonomies
settings tab, it cannot pre-populate the taxonomy term for that field. But, in those circumstances, that field could only ever have that option on that page, so why have the field in the form, unless you intend to go to a different results page where that taxonomy term is not longer specified. In which case, you could add some custom JavaScript to populate that field (with reference to the ID of the form and the field class name) with that value. -
AuthorPosts