Forums › Forums › Search & Filter Pro › Default category on radio selection
- This topic has 5 replies, 2 voices, and was last updated 6 years, 12 months ago by Trevor.
-
Anonymous(Private) November 27, 2017 at 6:48 pm #144137
Hello,
I have a client who has many categories, but has limited each category into it’s own shortcode to appear on specific pages.Is there a way with the dropdown or radio category filter to have the default category selected instead of all categories?
Example screenshot:
https://exclusiveimage.net/wp-content/uploads/2017/11/CAFS_radio_button_style.pngAnonymous(Private) November 27, 2017 at 9:53 pm #144187Here are the page settings:
https://exclusiveimage.net/wp-content/uploads/2017/11/Screen-Shot-2017-11-27-at-1.50.46-PM.jpg
https://exclusiveimage.net/wp-content/uploads/2017/11/Screen-Shot-2017-11-27-at-1.50.52-PM.jpg
https://exclusiveimage.net/wp-content/uploads/2017/11/Screen-Shot-2017-11-27-at-1.50.58-PM.jpg
https://exclusiveimage.net/wp-content/uploads/2017/11/Screen-Shot-2017-11-27-at-1.51.06-PM.jpg
https://exclusiveimage.net/wp-content/uploads/2017/11/Screen-Shot-2017-11-27-at-1.51.24-PM.jpgTrevor(Private) November 28, 2017 at 2:08 pm #144267Hi Jeff
Let us assume we have a site, where the category part of a URL permalink is stripped out.
If we have a site about trees, we might use category to sub-divide them, and one such category might be deciduous.
The url/permalink for that might be
http://mytreesite.com/deciduous/
And if I browse to that page, I would see an archives page with all the deciduous trees on. If I had the form setup as you have it now, deciduous would already be pre-selected in the Category field.
So, it rather depends what you mean by:
I have a client who has many categories, but has limited each category into it’s own shortcode to appear on specific pages.
I am unsure about the bits in bold, as to what you mean?
Anonymous(Private) November 29, 2017 at 11:20 pm #144687Trevor,
Thank you for the clarification. Simply, we have created a search and filter search form (shortcode) for each individual category (by using the advanced feature to hide all other categories). The client would like the default to be the single category we selected instead of All Categories.For your example, we made categories of trees. We limited each search and filter search form to be one category of tree (ex. redwoods) and under advanced unchecked all other tree types leaving us with one option in our dropdown, “Redwoods”. We would like the default shortcode to show “Redwood” as selected in the radio or checkbox instead of “all categories” being the default selected.
Is this possible?
Trevor(Private) November 30, 2017 at 12:29 pm #144786At this time (and this may change in V3, and you may ask me to add this as a feature request anyway) this can only be done by hiring a freelancer to write you some custom javascript for each page to see the value on document load. It might also be possible to do this using this filter:
Either way, the code written would have to check if it had been set already.
-
AuthorPosts