Forums › Forums › Search & Filter Pro › Category archive dynamic filter
Tagged: taxonomy
- This topic has 21 replies, 3 voices, and was last updated 3 years, 9 months ago by Ross.
-
Anonymous(Private) January 5, 2021 at 3:38 pm #271700
We need to add the search form to our category archive page for specific categories (we are using Divi and Extra)
Is there a way to show only the categories relevant to the one being rendered?
Something like what it is possible to do with the option ‘Detect defaults from current page’, but instead of showing all the categories on the website and having the defaults selected, we would like these defaults to be the only visible ones in the formTrevor(Private) January 6, 2021 at 12:09 pm #271768You would need to set the pages up using the method described right at the end of the guide (making sure you are using the extra extension that you can download from the top of the page – if you are logged in):
https://searchandfilter.com/documentation/3rd-party/divi/
Then, making sure that the Category taxonomy is in the form, set these settings:
1. Set autodetect category/taxonomy:
https://www.screencast.com/t/3B40jPYRF4SA
2. And also set ‘Enable filtering on Taxonomy Archives’:
https://www.screencast.com/t/piCPyshb6
Then you can use the same form on all category pages.
You might also want to filter out unwanted category terms, so in the General Setting tab, set
Auto Count
(both settings) toON
And then in the Form UI:
In each field set
Hide Empty
set toON
Anonymous(Private) January 6, 2021 at 3:08 pm #271784Hi Trevor,
Thanks for your help so far, however I am still having some trouble.
To try and explain my problem I have given an example below. Currently if I am on the archive page for child category 1a (site.com/category/category-a/child-category-1a), I am getting the option to filter by Category B, 1b and 2b, which doesn’t make sense.
If I am on the archive page for child category 1a, how can I make it so I can filter only by A, 1a and 2a?
e.g
-Category A
–Child category 1a
–Child category 2a
-Category B
–Child category 1b
–Child category 2bWe have set each field Hide Empty to ON, however it’s not doing anything as it is still counting posts from all categories.
Thanks!
-
AuthorPosts