Tell us what you are trying to do?
Trying to implement the Relevanssi plugin. I want to improve the search results. If I do a search for an exact match title, I'm expecting for it to be the first result, not 30th, in the search results
I have a filter that allows the experience to toggle between post types using this shortcode
[wpv-control url_param="wpv-post-type" type="select" values="product,post" display_values="Book Search,Story Search" auto_fill_default="product"]
Is there any documentation that you are following?
I followed both of these instructions, neither worked
https://toolset.com/course-lesson/searching-texts-in-custom-fields-with-toolset-and-relevanssi/
hidden link
Is there a similar example that we can see?
N/A
What is the link to your site?
N/A, local site
To capture all searches, I have the below code implemented in order to redirect to the Page I created with the custom View to show the results.
function wp_change_search_url() {
if ( is_search() && ! empty( $_GET[ 's' ] ) ) {
wp_redirect( home_url( "/search/?wpv_post_search=" ) . urlencode( get_query_var( 's' ) ) );
exit();
}
}
add_action( 'template_redirect', 'wp_change_search_url' );
Hello,
I think there is a misunderstanding, the Relevanssi plugin will take over the WordPress search result query, Toolset WordPress Archive can only customize the style/format the WordPress search result page.
In your case, you might consider custom codes, I have searched it in google, and find some related threads, for example:
hidden link
For your reference.
Hi Luo,
Thank you for the response.
So I created a page called Search, and it lives at /search/
Then I created a Toolset View inside of the Search Page to render the results.
Are you stating that this it not the correct method to render search results through Toolset Views?
No, since you are going to customize the query of WordPress search result page with Relevanssi plugin, the WordPress search result page is an archive page, so I don't think it is good idea to setup another page for it.
As I mentioned above, there isn't such kind of built-in feature within Toolset plugins, it depends on Relevanssi plugin, and it needs custom codes, please try the solution provided by relevanssi.com:
hidden link