How does the ajax search work ?

329 views September 26, 2016 November 15, 2016 admin 1

When you choose to display your search results with the ajax search theme delivered with the plugin, several things happen.

Search page

Wpsolr creates a search page “search-wpsolr”, which only content is a WordPress shortcode. See Is there a shortcode to display the ajax search where I need ?

Search form(s)

The standard WordPress filter ‘get_search_form’ is intercepted to replace your theme’s default search boxes with wpsolr’s search box.

add_filter('get_search_form', 'solr_search_form' );

The wpsolr’s search box form’s target url is then set to to the new page “search-wpsolr”.

Was this helpful?

Leave A Comment
*
*