Where is the live search coming from? Not from the theme? It’s not Relevanssi Ajax Live Search, that much I can tell. Is it from another plugin? The support for that plugin would be the best place to ask.
In any case, it’s something to do with CSS: something in the styles causes the search results box to appear behind the post boxes. Usually, this is handled by the z-index, but that’s not the problem: the section where the post boxes are has a z-index of 1 and the search results are at z-index 9995, so they should be above the post boxes.
Because the search results box disappears the moment I click somewhere else, it’s super hard to debug this, as I can’t inspect it. So I don’t know – but I can say this issue has nothing to do with Relevanssi.
Hi Mikko,
Thank you for the fast reply!
The live search must be coming from the theme, as I don’t have any other plugins; I’m sorry, I didn’t know. Not sure how to solve it as it doesn’t give me any options in the theme to adjust. Thank you anyway 🙂
Is that also the reason why the results in the live search include the Relevanssi search content, but once I click on the search icon, not all those results show? Is there a way I can solve this, or do I have to contact my theme for that as well?
Thank you so much!!
Yentl
No. The problem with the basic search is that you’re using a WooCommerce theme, and it’s by default restricting the search results to just products. You want other posts types in the results as well. Does your theme have a setting where you can choose which post types are included in the search?
If not, you can use this in your theme functions.php or in a snippet:
add_filter( 'relevanssi_modify_wp_query', function( $q ) {
$q->set( 'post_types', 'any' );
return $q;
} );
This should override the post type restriction.