Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #883485

    My “Instant Search” results that Enfold serves up via Ajax do not match the results visualized on the actual search results page indexed through the Relevanssi plugin. In the child theme I’m using I have added the code you provided on this page to the fuction.php file, but the problem persists.

    Do you have any suggestion on how to make the Instant Search display the same results as a full search?

    Thanks for your help!

    • This topic was modified 6 years, 11 months ago by nightjar.
    #884864

    Hey nightjar,

    I am afraid you’ll need to contact the plugin author for more info about the issue. Making third-party plugins compatible with the theme is unfortunately beyond the support scope we offer. Sorry for that!

    Best regards,
    Basilis

    #885002

    Hmmm… In the past you had proposed solutions to people with this very same kind of problem.

    Anyway, reading the FAQs on the plugin’s webpage, I have found this statement:

    “Any calls to query_posts() on search results template make Relevanssi fail silently. You’re not getting results from Relevanssi any more. This is unpleasant, but something I can’t really fix, considering that WordPress doesn’t offer any official way to replace search results and the way Relevanssi is coupled with WordPress is something of a hack. So, something simple like this can throw Relevanssi off.
    If you’re having problems with Relevanssi, the first step is to check your search results page, usually search.php. See if there’s a call to query_posts() and if there is, comment it out. In most cases that is enough to fix the problem.
    It’s not always query_posts(). Appearance of new WP_Query() is another sign of trouble, or $wp_query->get_posts();. Anything that queries the database for new posts is trouble for Relevanssi.”

    Do you have any idea if Envato “Instant Search” Ajax calls comprises the query_posts() one?

    • This reply was modified 6 years, 11 months ago by nightjar.
    #885902

    Hi,

    Yes, unfortunately, the theme’s ajax search uses the get_posts function to query posts. Did you enable the “aerei” post type in the plugin’s “Indexing Options”? If not, the ajax search will not include the post type.

    Best regards,
    Ismael

    #886150

    Yes, of course I have selected the “aerei” custom post type in Relevanssi’s Indexing Options, otherwise I just couldn’t get any result on the “standard” search performed by the plugin.

    I have made a post on Relevanssi support forum, and the plugin author replied as follows:

    “Adding that code doesn’t change the results at all? That seems to be the way to replace the Enfold Instant search with another search engine, but if it doesn’t work, then I’m afraid I can’t help you.
    To debug this, I’d need to see what does the $tempquery variable contain when it’s passed to Relevanssi.”

    Do you have any idea of what does the Enfold’s $tempquery variable contain when it’s passed to Relevanssi?

    Thanks for your help!

    #886935

    Hi,

    This is what the $tempquery looks like.

    // https://imgur.com/a/yzjOl

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.