Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Issue with Search Results for custom search template
- This topic has 7 replies, 2 voices, and was last updated 1 year, 11 months ago by
Ernest Marcinko.
-
AuthorPosts
-
June 10, 2024 at 6:46 pm #48431
agencydigitaltech
ParticipantAJAX Search Pro version 4.26.11
WordPress version: WordPress 6.5.4
Theme used: RealHomes By Inspiry Themes
Description:
We are experiencing an issue with the search functionality of Ajax Search Pro when using a custom search results page. Specifically, when a user enters a misspelled post name into the search form, the AJAX search suggestions display relevant results. However, upon submitting the search form, the custom search results page returns zero results.Here is the page where we have added the search form
/about/
Here is theme’s search
/properties-search/?Here is our overriding search.php that we are trying to get your results and display in themes styling
/public_html/wp-content/themes/realhomes-child/search.phpThe AJAX suggestions correctly display results related to the misspelled query.
The custom search results page shows zero results.Expected Behavior:
The custom search results page should display the same results as the AJAX suggestions dropdown when a misspelled query is submitted.Request:
We are using a custom search results that the theme provides.We need to match theme’s styling and functionality with your plugin results
Could you provide guidance on how to ensure that the search results on the custom search results page match the AJAX suggestions, even when the search query is misspelled? Any recommendations for addressing this issue would be greatly appreciated.
Thank you for your assistance.
-
This topic was modified 1 year, 11 months ago by
agencydigitaltech.
June 11, 2024 at 12:37 pm #48441Ernest Marcinko
KeymasterHi,
At the moment this is how it’s supposed to work – the predictive suggestions only work for the live search results list.
It’s intentional as it’s not possible to tell the user if the query was mispelled on the results page, as it’s controlled by the current theme. I will take this as a feature request though, and will try to add an option to the back-end to show these results either way – even if the user is not notified of the mispelling.
June 11, 2024 at 1:14 pm #48446agencydigitaltech
ParticipantHello and thank you!
Please read carefully our request and reply to us again. We just want to display your plug-ins results in our search template.
Now even the live results are different with results when we press the search icon which it redirects to the search page.
We looking a function that we can get your results output and feed our search.php so it meets the theme style
June 11, 2024 at 1:17 pm #48447Ernest Marcinko
KeymasterOh, I see.
In that case make sure to have the search results page override enabled. The plugin will then push the same results to the search query archive.
June 11, 2024 at 1:57 pm #48448agencydigitaltech
ParticipantYou cannot access this content.
June 11, 2024 at 1:58 pm #48449agencydigitaltech
ParticipantYou cannot access this content.
June 11, 2024 at 2:15 pm #48453agencydigitaltech
ParticipantLet us know if there is a global variable or function which the output will be same with WP_Query so we can feed themes’s template as you can see in the attachment search.php
June 12, 2024 at 9:24 am #48457Ernest Marcinko
KeymasterAll you need to do is loop through the items, no need for any custom code in the search.php file, just the default loop:
while ( have_posts() ) { the_post(); // post layout here } -
This topic was modified 1 year, 11 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.