Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Filtered by Category Auotpopulate View
This topic contains 7 replies, has 2 voices, and was last updated by Mike Nielsen 6 years, 6 months ago.
- AuthorPosts
- January 12, 2018 at 5:06 pm #16275
We have a main program listing of all our academic offerings. We have a separate search that shows everything. We want a targeted search for each of the different schools, so a subset of the entire listing. Each program is listing by a post entry. We were able to create a filtered search, but it only limits by school after someone searches, or selects one of the drop down filters. We need the initial display, before any end user interaction, to also only be limited by the specific school. We are using categories right now to accomplish this, but unsuccessfully. I was able to force the initial display to the targeted sub set school by adding a custom field entry, then adding that as an item on the Frontend Search Settings > Custom Fields, but to implement that solution, I would have to manually edit many posts. Would prefer something using categories
Basically, need the autopopulate to also filter by a designated category.
January 13, 2018 at 11:05 am #16282Hi,
A simple filter by categories should do the trick here.
I would suggest the following configuration (or similar):
– Choose to display all categories in the filter (or some of them), anc change their display mode to drop-down: https://i.imgur.com/uVhAOTV.png
– Also, turning off this option may help as well: https://i.imgur.com/Za3q9L9.pngThat should filter the results by category, and only display those that have that category registered, no missing results either.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 16, 2018 at 4:07 pm #16330I had that set as such, but at the onset, what is auto-displayed included everything. Only when I select a different option on the drop down menu, does it force the category filter. The only way I’ve been able to do a work around is by including the target category in the drop down menu, then changing from “Chose Any/one option” to As Defined and including the target category. With this, it now shows the target category in the drop down, which feels redundant and not desirable to display to the end user.
I set it that way for you to see on our Arts & Sciences page:
http://tst.lasalle.edu/programs/arts-and-sciences/We have three different schools. Our main program list page includes all majors, programs, etc from all three schools (there are different categories based on program type). On the Arts & Sciences program listing page above, we just want those programs associated with that school. I’m only able to do that if I use the As Defined option, but that means the default drop down option is “Arts & Sciences” which feels very redundant and doesn’t allow us to prompt the end user to select an option (ie displaying “Select One” by default).
January 17, 2018 at 11:40 am #16335Hi,
I’m not sure if I understand correctly yet:
– Do you want to display a filter, but restricted to a specific category of the current page?
– ..or you don’t need the filter, just restrict the results to the category of the current page?
– ..or the filter should be visible and set to the category of the current page?Let me know, and I may be able to suggest a solution, although it may require a bit of custom code as well.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 17, 2018 at 3:52 pm #16345Thanks. The first. Need restricted to a specific category and provide a filter for additional/other categories.
The reason is that we will have other pages with filters, but unrestricted initial views.
Could an option/feature request be to add an option under Layout Options > Search Box Layout > Auto Populate to be Enabled – Results for a specific category (akin to Enabled – Results for a search phrase)? Then have a field to designate the category?
I guess the issues is that we have two sets of categories in play. One set, used for filters across the board and apply to all three schools (ie online, adult, undergraduate, graduate, etc). The second set is the three school categories (Arts & Sciences, Business, Nursing). I guess we could separate using tags instead of categories, but not sure if that would accomplish the same, or not.
January 19, 2018 at 12:51 pm #16402Hi!
I think I get it now, and I believe it may still be doable.
May I ask, is this page: http://tst.lasalle.edu/programs/arts-and-sciences/
just a regular page, or some sort of category archive or something else? I’m asking, because there is an extensive plugin API, which allows executing code during the search process, and modifying the query arguments. If somehow there was a way to get the desired category based on that page ID, then it should be very likely easily solveable.There is actually an option on the back-end under the Advanced Options -> Exclude results panel, that allows including results only from specific categories. In this case however it would only work, if the category filter on the front-end did not have the ‘Choose one option’ selected as default – because that automatically means that inclusions should be ignored.
Best,
I’m thinking, if this option had the first set of categories choosen (or the only one you want), and the actual front-end filter only had the second set, without the ‘Choose one’ option. Then the plugin would automatically restrict to the first set defined on the back-end, and to the one that is selected from the drop-down as well.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 5, 2018 at 5:17 pm #16643Sorry for the delay in response. Got pulled into other projects. The page in question is just a regular page withe the search shortcode on it. I’ll try playing with your suggestions and report back.
February 5, 2018 at 5:49 pm #16647I sort of got it to work as outlined above. Just unchecking “Display the “Choose one/Any option?” box fixed the issue of showing everything, but I had to include the main target category as the first category term for the drop down boxes, or it wen to the first item.
- AuthorPosts
You must be logged in to reply to this topic.