Archived topic
Mobile menu does not work when hooks are added to navigation
7 replies · Started by Greg on August 3, 2020
Hello... I am having an issue with the mobile menu displaying while inside the navigation. It works fine until I add the inside navigation hooks. After that I just get the text "menu" (no burger icon or anything). And when clicking on it nothing happens. I also noticed that it is grayed out but it is white when it is working without the hooks. Sorry, I cant see how to upload screenshots. Thanks in advance! The site is not live anywhere but here is the code to the hooks:
Navigation Logo:
<?php
add_action( 'generate_inside_navigation','generate_site_logo_navigation' );
function generate_site_logo_navigation()
{
?>
<div class="menu-logo">
<img alt="Old City Windowbox Co." src="http://windowbox.local/wp-content/uploads/2020/07/Asset-4.png" />
</div>
<?php
}
Navigation Logo Text:
<?php
add_action( 'generate_inside_navigation','generate_site_title_navigation' );
function generate_site_title_navigation()
{
?>
<div class="menu-site-title">
Old City Windowbox Co.
</div>
<?php
}
Hi there,
Sorry what is the custom code for?
Where are you adding it?
Thanks for the reply. It is being added to the nav bar using the inside navigation hook. The logo icon and logo text are at the top left and the menu is on the top right. I hope this helps
Sorry still a bit confused.
Not sure why you need to use custom code for that layout?
The topic is also marked as resolved. Have you figured out?
Oh it must have defaulted to resolved. The custom code is so I can have a icon logo and a text logo in the navbar. I thought that it is not possible to do that without using a hook. So I have the icon logo top left. The text logo just to the right of that...all of which are positioned at the top left of the navbar. Then the menu items are to the right of the navbar. Thanks
Wouldn't that just be the mobile header option?
If not can you link me to the page in question?
I didnt know about activating menu plus to access mobile header section. I was able to get it somewhat how I wanted it using that option. I'll continue to work with it. Thanks for your help!
No problem :)