Reply To: How to offer a link/button/contactform if "No results!"

Home Forums Product Support Forums Ajax Search Pro for WordPress Support How to offer a link/button/contactform if "No results!" Reply To: How to offer a link/button/contactform if "No results!"

Ernest Marcinko
Ernest Marcinko


Just to make sure, please check that the “product” post type is selected on the General Options -> Sources panel.

Then please check the General Options -> Sources 2 panel on the search options, and make sure that no taxonomies are selected to be returned. (if you don’t want them to be returned of course, I believe you don’t)

If you are using the index table, and want to return the page relevant to the term name (instead of the category), you need to enable indexing for that taxonomy term (category, product category or with a similar name I guess). That way if the category (term) is selected for that particular page, it ‘s title will be indexed alongside with that post.

There is indeed a bug in that template file, I was able to re-create it on a fresh installation. I’ve made a tiny mistake in the code, whereas it checks for the “keyword-suggestions.php” file in the /asp/ directory, but includes the no-results.php correctly. Sorry about that.

The resolution is to copy over the keyword-suggestions.php file as well from the ajax-search-pro/includes/views/results/ folder to the /asp/ subfolder in your parent theme directory.

Note: The wordpress function reference tells me that the /asp/ folder needs to be in the parent theme directory, as the plugin is using the get_template_directory() call to get the theme directory – which turns out to always return the parent theme directory, no matter what.

Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)