• Resolved kyleb740

    (@kyleb740)


    In addition to our pages/posts that you can search through Relevannsi, our site has other databases that can be searched. We are trying to consolidate all these different searches into 1 page on our site where the results will also show on that page. We are not attempting to combine the results from each search together but rather separate them out via sections. However with Relevannsi the search results always open to our results template page.

    Is it possible to display the results of a pages/posts search through Relevannsi on this combined search page? Or will a Relevannsi search always have to be opened in the results template page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Relevanssi doesn’t have to do anything; this is all WordPress behaviour. Relevanssi gets a request for posts, does a search and returns the posts. WordPress and your theme do the rest. The easiest way to do this is on the default search results template, but it’s not the only way.

    If you want to display Relevanssi results somewhere else, you can create a custom query. It’s just like any WordPress search query: create a new WP_Query that has a s parameter with the search terms. To make it a Relevanssi query, also set the relevanssi parameter to true. You’ll get results back, which you can then display the way you want to.

    Thread Starter kyleb740

    (@kyleb740)

    Thanks Mikko

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display Search Results on a Different Page’ is closed to new replies.