"No results found for…" replacing the search form
- iuliansaftaParticipant5 years, 1 month ago #13532
Hi,
Recently I installed WPSOLR plugin for a project and I’m using the default [solr_search_shortcode] to search and display the results. Everything it’s ok until when I have no result, the plugin doesn’t display the form anymore, so I have to refresh the page or go back to the previews search.
Debugging I’ve seen that:
`
fun_search_indexed_data()
`
returning this
`
echo “<span class=’infor’>” . sprintf(OptionLocalization::get_term($localization_options, ‘results_header_no_results_found’), WPSOLR_Service_Container::get_query()->get_wpsolr_query(”, true)) . “</span>”;
`
instead of a template.There is a way to maintain the search form when no results are returned from search?
Thank you!
iuliansaftaParticipant5 years, 1 month ago #13534Version: 21.5
iuliansaftaParticipant5 years, 1 month ago #13536If I’m switching to “Use my own theme” I can benefit of “Cross-domain” search? From what I’ve read in the documentation search in multiple domains works “Only the shortcode Ajax template”.
thanks!
wpsolrKeymaster5 years, 1 month ago #13538You’re right. It is mandatory to use the Ajax shortcode with multi-domain search. The reason is that the_post() used by your theme will not work, as some posts come from other sites.
Back to your original question then!
The empty results message is taken from the localisations (screen 2.6), in fact the text “Message no results found”. You could use it to add your own text, eventually containing a link/button to the full search url /mysearch/?search=
iuliansaftaParticipant5 years, 1 month ago #13551Thanks for your answer!
I would like to ask you if this is going to change in the next versions? We’ll be able to have a custom (search form / display results) working with cross-domain search?
iuliansaftaParticipant5 years, 1 month ago #13555Hi,
It’s working!
Thank you!
You must be logged in to reply to this topic.