Forums › Forums › Search & Filter Pro › Filter inside current category
- This topic has 4 replies, 3 voices, and was last updated 4 years, 5 months ago by Anonymous.
-
Anonymous(Private) July 22, 2020 at 10:00 am #253537
When we have a Search & Filter form on a category archive page, how can make sure the filtering happens only on posts belonging to the current category?
Any way of adding a hidden field that contains the category ID and have it submitted alongside the other filters via ajax?
We only want to filter on products that belong to CAZymes > Glycoside Hydrolases > Acetylgalactosaminidases
Ross Moderator(Private) July 22, 2020 at 10:45 am #253541You can take a look in the
tags, categories and taxonomies
tab of your search form – and you can include / exclude any specific term there.If you want to do this dynamically, based on the current page being viewed, you can use a PHP hook to change the query arguments –
https://searchandfilter.com/documentation/action-filter-reference/#edit-query-argumentsThanks
Ross Moderator(Private) July 22, 2020 at 3:46 pm #253581Ah yes! That would work, easier solution 🙂
Best
-
AuthorPosts