Archived topic
Mobile menu is not in the correct position
9 replies · Started by Christiano on October 6, 2022
I do not have changed anything related to the menu bar (it's rendered automatically, I modified only the elements) but suddenly the its position has changed.
What could be the problem?
THANKS! ☺️
Hi there,
have you used Block Elements to add most of your content to the page ?
Hi David! 😃
Yes, I did. Do I have to choose different priorities perhaps?
What are the hooks you are using for the block elements above the mobile header?
No one...
This are the hooks in use:
- generate_after_header
- generate_after_entry_content
- wp_footer
- wp_body_open
- generate_after_primary_menu
- generate_before_main_content
That's all.
THANKS! 🤗
Any generate_after_header hook elements increase the Priority to 50 this will hook it in after the mobile header.
Hi David, glad to hear from you! ☺️
Increasing the priority seems to fix the problem but before doing that the header was shrinking slightly when you scrolled the page while now it disappears only to became visible again when you scroll down. (I hope to have described it clearly! 😅)
It's not a big issue but if I could easily fix it...
THANKS AGAIN FOR YOUR EFFORTS! 🤗
PS. I'm definitely very happy with you guys, GeneratePress has a wonderful customer service. Keep on like this! 👍🏼👍🏼👍🏼
In Customizer > Layout > Header --> Mobile Header, you have the Hide when scrolling down option checked. Uncheck that.
Done! Thanks! 🙏🏼🤗
You're welcome