Archived topic
Hamburger menu in footer without plugin
5 replies · Started by Ralph on December 10, 2020
Hi Generatepress -blocks team, Is it possible to display a hamburger menu in the footer without the need of a plugin. I created a block / hook and marked the location where I would like the hamburger menu to be displayed.
Best regards, Ralph
Hi there,
what would this Hamburger menu open ?
Hi David, The hamburger menu would open a Wordpress menu, created under appearance/menu. The menu contains links to articles and posts. I enclosed a link to the website I am trying to rebuild with Generateblocks.
Hi there,
This sort of thing would require custom javascript/HTML/PHP.
What if it just opened our built-in off-canvas panel instead?
Hi Tom, That sounds ok. Are you saying the off-canvas panel can be triggered/opened by an icon/button in the current footer? If so, can you point me to into the right direction. For test purposes I already build a off-canvas panel. How do I proceed from here :-).
Hi there,
to trigger the off canvas from any where you can simply create a button or link and give it a class of slideout-toggle
For example this HTML:
<a class="slideout-toggle" href="#">Off canvas toggle</a>
Then to hide the Toggle in the primary nav you can add this CSS:
.main-navigation .menu-bar-item .slideout-toggle {
display: none;
}
Make sure to set the Off Canvas Panel to display only on Mobile.