Tagged: Instant search, relevanssi, results
-
AuthorPosts
-
November 30, 2017 at 4:33 pm #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 7 years ago by nightjar.
December 4, 2017 at 11:43 pm #884864Hey 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,
BasilisDecember 5, 2017 at 12:26 pm #885002Hmmm… 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 7 years ago by nightjar.
December 7, 2017 at 5:04 am #885902Hi,
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,
IsmaelDecember 7, 2017 at 4:19 pm #886150Yes, 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!
December 9, 2017 at 6:33 pm #886935 -
AuthorPosts
- You must be logged in to reply to this topic.