Archived topic
Mobile menu positioning
3 replies · Started by Gillian on July 26, 2017
Is it possible to move the hamburger menu up into the mobile header? I've got my site title etc hidden and have an image in the mobile header floated to the left at the moment. I want the hamburger menu to be on the right in line with the image.
At the moment I've got some php in my child theme:
add_action( 'generate_inside_mobile_header','tu_mobile_header_html' );
function tu_mobile_header_html() { ?>
<div class="mobile-header-content" id="shefford-header">
<p> Opening hours: Mon - Fri: 9:00 - 5:30, Sat: 9:00 - 12:00<p>
</div>
<?php }
Thanks
Hi there,
Not quite sure what you mean?
If you are using mobile header, it allows you upload a mobile header logo and the menu toggle should be inline with the logo on the right: https://docs.generatepress.com/article/mobile-header/
If this doesn't work can you provide a link to your site?
Thanks!
Hi Leo
It works OK in the mobile header until I add the php in my original post. Then the hamburger menu appears below the text which has been added, whereas I want it to appear above it in line with the mobile header logo.
Site is
http://devel.sheffordosteo.com/
I've only just started on it so the rest of the page layout is rubbish on the desktop, etc. It's just the header I'm concerned with at the moment.
Thanks
Doesn't look like there is enough room in the mobile header for that content.
Try adding it in the After Header hook:
https://docs.generatepress.com/article/hooks-overview/
http://demo.generatepress.com/hook-locations/
Then we can hide it on desktop with built in classes. So try something like this in the hook:
<div class="open-hours hide-on-desktop hide-on-tablet" id="shefford-header">
<p> Opening hours: Mon - Fri: 9:00 - 5:30, Sat: 9:00 - 12:00</p>
</div>
Let me know if this works.