Hi,
I have added code to my functions.php file to display only certain post types in my on-site search results page and it is working. But those excluded post types are still displaying in the ajax results. I read this thread but could not find the referenced file in my file manager. How can I either exclude certain post types or turn off the ajax? https://kriesi.at/support/topic/remove-or-fix-ajax-search-functionality/
Hey williamslyd,
Thank you for the inquiry.
You can turn off the AJAX search by toggling the Append Search Icon To Main Menu option in the Enfold > Main Menu panel. Let us know how it goes.
Best regards,
Ismael
Thank you for the advice. Ideally, I would like keep the search icon on the main menu. But I only want certain post types to show up in the ajax results. Can I limit the results, as I have been able to do with the search results page?
Hi,
To disable it, open js/avia.js go to line 90 and comment it like this:
// new $.AviaAjaxSearch({scope:'#header, .avia_search_element'});
then disable both Enfold Theme Options ▸ Performance ▸ JS & CSS file merging and compression and enable Enfold Theme Options ▸ Performance ▸ Delete old CSS and JS files Then clear your browser cache and any cache plugin a few times, and check.
Please remember that clearing javascript files can take a few tries. I tested this and it works to remove the ajax function:
Best regards,
Mike