This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Issue with Search Results for custom search template

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Issue with Search Results for custom search template

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #48431
    agencydigitaltechagencydigitaltech
    Participant

    AJAX 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.php

    The 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.

    #48441
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    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.

    #48446
    agencydigitaltechagencydigitaltech
    Participant

    Hello 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

    #48447
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Oh, 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.

    #48448
    agencydigitaltechagencydigitaltech
    Participant

    You cannot access this content.

    #48449
    agencydigitaltechagencydigitaltech
    Participant

    You cannot access this content.

    #48453
    agencydigitaltechagencydigitaltech
    Participant

    Let 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

    #48457
    Ernest MarcinkoErnest Marcinko
    Keymaster

    All 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
    	}
     
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.