Archived topic
Generate Press Menu Issue
7 replies · Started by Martin on June 15, 2022
There seems to be a problem with my website menu. When I search a keyword that is on the menu list but not on the page that I currently opened. It seems to be counting as part of the word count in the page. Please check on this link of the video to be more clear about the issue : https://www.loom.com/share/3693921c7df24c28a02e79ab6f2cf145
Hi Martin,
I can't hear your voice clearly, and I don't think it's a theme issue as the theme can't control how the browser acts.
And when I check on my end, the issue doesn't exist:
https://www.screencast.com/t/K1f40EBV2
Maybe try another browser or clear your browser cache?
Hi here is another video to illustrate or to show what I am trying say about the issue : https://www.loom.com/share/21900dd954dc4605a62aa15570a2b174.
I tried also other browsers but still it's showing the same issue.
I understand your issue, but it's not possible that caused by GP, and I don't think we have a solution for that.
You can try switching to another theme, does this issue disappear?
And can you try testing in an incognito window to eliminate conflicts from browser extensions?
Yes, this issue does not exist with any other themes.
It is clearly caused by GP and the issue only appeared recently. Last year the "Crtl + F" search did not count hidden menu items.
The issue has nothing do with browser extensions or icognito windows. It also happens on Microsoft Edge or Firefox.
Menu items should not be counted by a "Crtl + F" search, if they are hidden.
Clearly something is wrong in the code of the theme.
Please forward this topic to someone from your tech team.
The issue is very serious because this incorrectly programed menu might lead to ranking penalties by Google and makes looking for words on the page with "Crtl + F" complicated and confusing for website users.
Hi there,
The issue here is that the sub-menus are not hidden from the browser. This is intentional as hiding them from the browser (display: none;) would be a very bad accessibility issue.
If you'd like to do this despite the accessibility issues, you can with this CSS:
.main-navigation ul ul {
display: none;
}
.main-navigation:not(.toggled) ul li:hover > ul,
.main-navigation:not(.toggled) ul li.sfHover > ul {
display: block;
}
As for search ranking penalties - I don't believe sub-menus will result in any issues. Thankfully, search engines like Google are smart enough these days to know the difference between hidden sub-menus that appear on hover and maliciously hidden text that has been hidden to trick them.
Hope this helps!
Hi Tom,
Thank you so much for your help!
Can you please tell me where exactly I need to add this code?
I'm not a very technical person and I'm worried to break something in the theme.
Thank you!
Martin
Hi Martin,
This is CSS code, you can add it to customizer > additional CSS.