Simple bug fix release. 1.7.8 had some overeager optimization attempts that failed and caused some searches simply not work. I removed those and everything should work now.
Not logged in. Log in to see your license details.
Simple bug fix release. 1.7.8 had some overeager optimization attempts that failed and caused some searches simply not work. I removed those and everything should work now.
Not logged in. Log in to see your license details.
Sometimes it’s nice to have a category filter on the search results pages: a simple dropdown where you can choose the category you want to show. It’s easy to create one using wp_dropdown_categories() but on a search results page, that’s slightly problematic, as it’ll include all categories, not just those……in place, there’s instead a link that removes all category filters. function rlv_category_dropdown() { global $rlv_categories_present, $wp_query; if ( ! empty( $wp_query->query_vars[‘cat’] ) ) { $url = esc_url( remove_query_arg( ‘cat’ ) ); echo “<p><a href=’$url’>Remove category filter</a>.</p>”; } else { $select = “<select id=’rlv_cat’ name=’rlv_cat’><option value=”>Choose a category</option>”; foreach (……} } asort( $rlv_categories_present ); return $hits; } Add this snippet to your site. If you want this to use WooCommerce product categories, replace the category in the get_the_terms() call with product_cat like this: $terms = get_the_terms( $hit->ID, ‘product_cat’ ); Then we can create the function that displays the dropdown….
…$wp_query; if ( 1 === $wp_query->post_count ) { switch_to_blog( $wp_query->posts[‘0’]->blog_id ); wp_redirect( get_permalink( $wp_query->posts[‘0’]->ID ) ); exit(); } } } The code is originally from WP Beginner. If you want to redirect particular search terms to posts without going through the search results page, that looks like this: add_action( ‘template_redirect’,…
3 Comments. Leave new
Great plugin, but I have got a problem. The update core page displays all the time, that relevanssi is not up to date.. How can I fix this problem, because it’s a litte bit annoying.. 🙂
Yes – this is mentioned on the support page and in every email update I’ve sent to users. If it bothers you, remove the API key from the settings page.
I’m hoping to get this fixed in the next version.
k so I will wait to the next version 🙂