Forums › Forums › Search & Filter Pro › Incorrect categories and results being displayed.
Tagged: elementor pro, learndash
- This topic has 4 replies, 2 voices, and was last updated 5 years, 7 months ago by Trevor.
-
Anonymous(Private) May 1, 2019 at 10:25 pm #209855
I am using search and filter pro with elementor pro posts widget.
I have created a search form and in general options I have chosen:
-search in the following post types: coursesNo posts. I just want users to be able to filter among learn dash courses/programs I offer. I choose custom display method for results and name the page the results should be displayed on.
I then go to edit the page I want the search/filter to display and put these shortcodes in a text widget at top of page:
[searchandfilter id=”1198″ action=”filter_next_query”]
[searchandfilter id=”1198″]In another section i then put the elementor pro posts widget and display all the courses offered.
However, in my search/filter options the count is zero for courses and i cannot filter these. If I choose blog posts then i can populate the categories but the results don’t show.
Trevor(Private) May 2, 2019 at 12:09 pm #209891If you had a HTML widget (using the Text tab to enter the code), the code entered would look like this:
[searchandfilter id="1198"] [searchandfilter id="1198" action="filter_next_query"] <script>(function ( $ ) { "use strict"; $(document).on("sf:ajaxfinish", ".searchandfilter", function(){ elementorFrontend.hooks.doAction('frontend/element_ready/posts.classic', jQuery('.elementor-widget-posts')); }); }(jQuery));</script>
Notice that the shortcodes are the other way around? The script is needed.
Anonymous(Private) May 2, 2019 at 5:25 pm #209946Hi Trevor,
Please ignore my previous comment, I had the plugin disabled!
I’ve added the code as specified and I believe all is working. I’ve noticed that if a certain course does not have any tags it does not display. seems they need a category and a tag associated with each one as those are the dropdowns I have on the page.
Trevor(Private) May 3, 2019 at 11:04 am #210021That may be a setup issue. Did you use the settings on the tags, categories and taxonomies settings tab? If so, be very careful doing this. IF, for example, you used INCLUDE on categories, and included ALL, it is better NOT to do this at all (leave the field blank) as ALL will still be included, but so will those with NO categories. So, be careful NOT to do this (as an example):
https://www.screencast.com/t/25YmicLYz5A
You see I selected all of them (you may have many more)? It is not a good idea to do this.
-
AuthorPosts