Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Possible Ajax Conflict
- This topic has 4 replies, 2 voices, and was last updated 2 years, 4 months ago by
Ernest Marcinko.
-
AuthorPosts
-
January 18, 2024 at 6:56 am #46646
tomo_5
ParticipantPage url: http://dev.buildreview.org/?s=test123&asp_active=1&p_asid=2&p_asp_data=1&filters_initial=1&filters_changed=0&qtranslate_lang=0&woo_currency=NZD¤t_page_id=35607
Search String: test123
Search via Sidebar search box
Expected search results: 12 Posts
Theme displays 10 archive posts then load more button
Pressing load more button fails to load remaining 2 posts
Load More Button is ajaxThis is a development website, feel free to modify data and seetings to suit your needs.
If you need directory access then feel free to download directory plugin.
Any problems, please email: [email protected]I am also curious why the search results url is so long, is there a way to tidy this up please?
Many thanks,
Ian
January 18, 2024 at 5:27 pm #46655Ernest Marcinko
KeymasterHi Ian,
I only suggest using a load-more feature if it respects the current query string (the arguments in the browser URL). They usually do that, but not in every case, sometimes the load-more will try to load the next page without the query arguments, which may not trigger the search override. In worst cases they use a custom query via the ajax handler, in which case it’s not possible to override.
I have tried to enable that, and it is unfortunately using a custom search endpoint to load more results, not actually loading the next results page. It is not a bad practice, but it makes it nearly impossible to override as it is not recognized as a search query.
I suggest using regular pagination, it is usually much better in every aspec, as it does not require extra scripts and it is SEO and navigation friendly as well.
January 18, 2024 at 8:14 pm #46661tomo_5
ParticipantYou cannot access this content.
January 19, 2024 at 6:54 am #46663tomo_5
ParticipantAlso, should the theme’s existing full site search be able to use the live ajax search? Our search bar in the header may need checking please.
January 19, 2024 at 10:58 am #46672Ernest Marcinko
KeymasterI also notice on the theme that they have embeded the SearchWP Live Ajax Search plugin into the theme, maybe this is also causing possible problems?
Could be but unlikely. It is rather that the “load more” request is not an actual search query to the results page, but a custom made query to a custom handler somewhere on the server.
site search be able to use the live ajax search?
Very likely. First I would suggest trying the automatic replacement feature. If the search form is printed via the get_search_form() call, then it should be replaced automatically.
If no luck, then checking the theme customizer/editor might be the way. Most themes offer replacing the widget in the pop-up with anything, and there you could use the Ajax Search Pro shortcode. -
AuthorPosts
- You must be logged in to reply to this topic.