Forums › Forums › Search & Filter Pro › Searching by sub categories
Tagged: categories, sub-categories
- This topic has 14 replies, 2 voices, and was last updated 7 years, 4 months ago by Anonymous.
-
Anonymous(Private) June 21, 2017 at 9:40 am #116052
Hi there
Just started using your plugin and had a quick question.
I need to have the search form broken up into sub categories, by which I mean something like:
Parent category (heading) > Dropdown list with all sub categories in the parent category.
How do I do this?
Many thanks
Trevor(Private) June 21, 2017 at 1:01 pm #116107If I understand you correctly (you do not give a URL to look at), you seem to be using the Category field more than once in the form, and this you cannot do. I would guess that you have multiple parent/child hierarchies (or groups of terms) in that category/taxonomy and want them as separate dropdowns.
It is best not to do it this way (as it will most likely go wrong). Instead you need to split the parent terms into separate taxonomies.
You can use a plugin to add these custom Taxonomies, and another plugin to move the Category terms (always switch the parent of the children with the children).
This post tries to explain this a bit better (you can use a plugin to switch category terms from category to any new taxonomy that you make, so it is not so hard to do). It is a really awful preachy lecture I wrote:
https://support.searchandfilter.com/forums/topic/multiple-categories-combination/#post-55166
Sorry about the tone, but the message is right and it links to good plugins (except taxonomy switcher I think). If I missed anything (I probably did, my apologies), follow up and nudge me.
Trevor(Private) June 23, 2017 at 1:51 pm #116565Hi
So, I have taken a look. You have the form set to use As an Archive for its Display Results Method, and to use the Uncode theme search.php template. However, that template in Uncode uses its own search function and thus you will see a No Results page when you do a search.
Have you tried setting the form to use the template that Uncode uses for the category page (if you know which file that is)?
Anonymous(Private) June 23, 2017 at 4:19 pm #116592Thanks for getting back.
I’ve done that now and used archive.php to dsiplay results and the images are showing now which is great.
The actual filtering doesn’t seem to be working properly though, by which I mean, when I get a page of search results and then try and filter it it shows all posts not just the ones in the filter I stipulated, for example if I try “infographic” it should only return 1 post but shows all of them, then when I try and filter again nothing happens.
Can you help? Cheers
-
AuthorPosts