Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Category page with Ajax filter and search
- This topic has 15 replies, 2 voices, and was last updated 2 years, 6 months ago by
Ernest Marcinko.
-
AuthorPosts
-
November 23, 2023 at 9:33 am #46136
george
ParticipantI am trying to build a category page with Ajax search and filter. My url:
https://www.gameforce.blog/category/faqs/I want to select the sub-category to filter the posts in that category. I followed this tutorial, but it did not works as my expectation. Instead of filter the already shown posts in the page, it show the results in live search box. Please see my screenshots.
https://knowledgebase.ajaxsearchpro.com/miscellaneous/tutorials/demo-setup-staff-search-and-filter
Is there any option that I missed?
Thanks in advance.
Best regards,
CactusthemesNovember 23, 2023 at 2:30 pm #46145Ernest Marcinko
KeymasterHi,
The most likely cause is that you may need a customized DOM selector. Based on your page layout, try this:
.main-content .block-wrap .block-contentPut it here.
November 25, 2023 at 11:38 am #46182george
ParticipantThanks for your valuable information.
I missed that option. But I just configured as you suggest, the search behavior is correct, but the results does not load correctly. They always are same.
Can you help?
Best regards,
WP StylishNovember 27, 2023 at 10:43 am #46194Ernest Marcinko
KeymasterHi,
The search should be okay – but the category filtering on the category page might be a problem here. See you try to filter the items in the “Faq” category page to switch to a different category from the same taxonomy. But because this is a specific taxonomy term (Faq) archive page, it’s not possible to simply change it to another one, as that is a different archive alltogether. An archive page for a category should always display items matching that category – because that is what it’s made for.
This could very likely work on the post type archive page though – so showing everything from that post type then filtering by taxonomy or vice versa.
Another possibility is to not use the archive for that, but simply use the plugin on a separate single page, preset the filter to the “Faq” item, then enable the auto populate. That way it will automatically show the items for that FAQ in the search results container, and the user can switch to a different categor – like this example.
November 28, 2023 at 12:35 am #46214george
ParticipantHi,
Thanks for your information.
So as I understand, It’s unable to place a category filters on a category page, right? So I just created a page with Elementor, using the Posts Block widget (from theme) to show the posts from FAQs category. Then I added the class (asp_es_1) to that Elementor widget to trigger live search/filter, but no luck. As you can see, my page does not have live search or live filter.
– When I typing keyword, I have to click on Search icon to see the results.
– When I select category filter, the posts block seems like reload, but always same results.Can you take a look?
Sorry for bother you, the plugin is powerful so it’s also difficult to configure, at least for me. 🙂
https://www.gameforce.blog/faqs/
Best regards,
CactusthemesNovember 28, 2023 at 1:12 pm #46218Ernest Marcinko
KeymasterSure!
Are you using the default posts or products widget there? Custom made widgets or addon widgets may not recognize the override and will simply ignore the custom query.
The loop grid with the posts widget may work, but it has not been tested for 100% of the cases yet. I suggest staying with the default posts widget, that should work all right.
November 29, 2023 at 10:44 am #46227george
ParticipantAh, but Posts widget only available for Elementor Pro. So can you suggest another simple way to accomplish my requirements? 🙂
November 29, 2023 at 11:12 am #46232Ernest Marcinko
KeymasterSure!
Instead of using Elementor altogether, you could make something like this (on the right side), using only the search plugin.
For that:
– choose any horizontal theme
– turn off the horizontal scroll
– turn on the load more (if you want to)
– turn on the auto populate
– change the results display mode to blockNow place the shortcode anywhere on a page, and when you open the page the plugin will trigger and show initial results.
November 29, 2023 at 11:17 am #46233george
ParticipantThanks for your prompt reply.
So I only need to place Ajax Search Pro shortcode on empty page (default page template without any content). Ajax Search Pro shortcode will show the search box, filter and posts lists as my requirements.
November 29, 2023 at 11:25 am #46234Ernest Marcinko
KeymasterYes – exactly, nothing else is needed.
November 30, 2023 at 4:44 am #46244george
ParticipantThanks so much.
I nearly get what I want. Only two things:
– the filter is bottom of search result instead of above (screenshot)
– can I make the page looks like a blog listing page? without box and longer…November 30, 2023 at 5:04 am #46246george
ParticipantHi,
I found out the options to configure what I want. Thanks for your great support and the super plugin.
Best regards,
CactusthemesNovember 30, 2023 at 5:11 am #46247george
ParticipantHi,
I think this is my last question.
Does the auto populate just show the posts from the selected categories in Front End Search Settings?
November 30, 2023 at 11:30 am #46254Ernest Marcinko
KeymasterYou are welcome!
Yes – the filters apply to the auto-populate as well.
December 1, 2023 at 7:12 am #46260george
ParticipantThanks for your confirmation.
You can close the ticket now. Thanks for your help again.
-
AuthorPosts
- The topic ‘Category page with Ajax filter and search’ is closed to new replies.