Archived topic
Hook Not Displaying in Off Canvas Panel
8 replies · Started by Mikki on February 19, 2023
Hello. I created a menu_bar_items hook which is displaying correctly on the desktop; however, it does not appear in the off-canvas panel on mobile. I'm wondering if I'm using the wrong hook name or if I need to create two hooks: one for desktop and one for mobile. Sorry for the newbie question!
Here's the site: https://parentsclimatecommunity.org
Thanks in advance!
Hi Mikki,
Yes, if you want it to appear in the Off-canvas panel as well, you'll need to create another copy of the hook and hook it to after_slideout_navigation or inside_slideout_navigation.
Thanks, Fernando! I created a duplicate hook as suggested, but it still isn't showing. I tried making the menu item height extra large to see if there just wasn't enough space for it, but that didn't seem to make a difference. I've tried to disable and/or purge cache wherever I can think of too just in case that was an issue, but that hasn't been successful either. Any other suggestions?
Oh, and I was using one menu for both the primary nav and the off-canvas panel, so I tried creating a separate one just for the off-canvas panel, and that doesn't seem to work either.
Can you provide admin login credentials so I can take a closer look as to why it isn't working?
Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Sure! Thanks again for taking a look!
Hi there,
the button that you have hooked into the off canvas panel, has the hide-on-mobile CSS class. Can you remove that ?
Well, that's embarrassing! I'd blame it on a lack of coffee, but I'm pretty sure it's my beginner skills. :-) It's in the off-canvas panel now and just needs some spacing adjustments. Thank you very much for your patience with me, and have a great day!
Glad to be of help :)