Weird Search Results

Just noticed that when searching for certain words the results are displayed in a weird way (no website menu): https://prnt.sc/gkb0an This was when searching for the word “cooler” – there is an article “summers are cooler” But when searching for “beer” everything is displayed fine: https://prnt.sc/gkb17h

I am currently using the search plugin Relevanssi, but tried with disabling it - the issue still persists so it is not caused by the plugin. Also disabled other plugins and used the native WordPress search engine but still no change.

Any idea what might be causing this behavior?

Thank you,
Petar

Hello There,

I have investigated the issue and it is because you have added this custom css in one of the page in the results.:

.x-navbar-wrap{
   display:none;
}

I went ahead and replace your custom css with this code instead:

.postid-18621 .x-navbar-wrap {
    display: none;
}

I used the post ID so that it will not be applied in the search result. If you want to find out how to get the post ID, please check this out: https://theme.co/apex/forum/t/setup-how-to-locate-post-ids/59

Please check your site now.

1 Like

Awesome! You guys rock!

Which was the page, by the way? I tried to apply the above method to those two posts but it doesn’t seem to be working (the menu is being displayed): https://travelcrestedbutte.com/weeklybliss/ and https://travelcrestedbutte.com/skip-70-stay-free/

Hi There,

The above post id is related to this post (https://travelcrestedbutte.com/summers-are-cooler/).

With regard to your recent issues, use the term page-id- for example page-id-18045 instead of .postid- because you’re referring to the WordPress pages.

Hope that’s clear.

1 Like

So obvious and still didn’t come to mind! Thank you, appreciate it!

Just noticed something else as well. When searching for “cooler” the results show different than searching for “bliss” for instance. Both words were associated with a post and a page containing the problematic code:

.x-navbar-wrap{
display:none;
}

Which is now fixed, but the “cooler” gives a result where there is no “Headlines” to click on - https://prnt.sc/gpx16g and “bliss” gives a normal result - https://prnt.sc/gpx1hf

Any ideas on this one?

Hi,

There are no headlines because of this.

.entry-header {
    display: none;
}

You need to remove it for the headlines to appear.

Hope that helps

1 Like

Thank you so much guys - that was really helpful! Used the same method as the one with the page id to hide the header only on the specific page.

You’re welcome! :slight_smile: