• Hi Mikko,

    Great work on the Relevanssi Search plugin!!

    I have a problem as my search results appear behind the content on my website. Is there anything I can do? I’ve asked in the help forum of my theme, but they say I’ll have to ask you. Hopefully, you have any suggestions!

    Also, the search results in the dropdown are great as they do include the content of my post (which makes me like your plugin!) but if I click on the search icon, some of those results don’t appear on the dedicated search page? Is that something we can solve? 🙂

    Thank you so much,

    Have a great day!

    Yentl Doggen

    • This topic was modified 3 years, 5 months ago by yentldoggen.

    The page I need help with: [log in to see the link]

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

    (@msaari)

    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.

    Thread Starter yentldoggen

    (@yentldoggen)

    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

    Plugin Author Mikko Saari

    (@msaari)

    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.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Search results appear behind content’ is closed to new replies.