Archived topic
masthead.site-header disappears in mobile view (tablet + mobile phone)
7 replies · Started by Ryan on April 19, 2019
Hi,
I have added Yoast SEO Breadcrumbs in this section (masthead.site-header). It shows up nicely on desktop view with the Yoast breadcrumbs
However, when I switch to mobile view, this section disappears. How can I enable this section to still appear? but under the mobile navbar?
P.S. My site is currently in "Coming soon" mode.
Hi there,
I'm guessing that's because you are using the mobile header feature:
https://docs.generatepress.com/article/mobile-header/
How are you adding the breadcrumbs currently? Have you checked out this article?
https://docs.generatepress.com/article/adding-breadcrumbs/
Let me know :)
Hi Leo,
Yes, I had followed the steps stated in the link you pasted above.
How can I still allow this section to appear? I see from a reference website that this is possible (even with mobile-header enabled):
You added through before_entry_title hook?
If so mobile header shouldn't matter.
Can you disable coming soon so I can see?
Hi Leo,
Yes, have disabled coming soon already.
I added the Yoast SEO breadcrumbs at the hook: after_header_content
Kindly advise
after_header_content is part of header so it would disappear on mobile if you are using mobile header.
Try the after_header hook:
https://docs.generatepress.com/article/hooks-visual-guide/
I see. Ok, but how come it works for this website? It uses GeneratePress as well.
Also, if I change it to after_header hook, how can I style this then?
That site is not using the header by default, it's just using the navigation as a header:
https://docs.generatepress.com/article/navigation-as-a-header/
How would you like to style it?