Site logo

Archived topic

Changing Off Canvas Slide Out Menu Icon

3 replies · Started by Jasmine on May 4, 2020

Viewing posts 1–4 of 4

Hi, I am wanting to change the icon for the Off Canvas Slide Out Menu into a custom hamburger icon generated by a hook.
I know I can change it to a different Font Awesome icon, but this is not what I am looking for.

I have managed to change the mobile version of the icon using a hook, but can't get the desktop version to work.
I can get the icon to show up, but when I click it, it doesn't open the menu.

Essentially, I want the hamburger that shows on the mobile view to show on the desktop view as well. I have tried hooking into various navigation hooks as I said, but nothing happens when I click the new hamburger, so I think I am missing an entire step somewhere.

Can you help, please!

Hi there,

You could try this:

add_filter( 'generate_off_canvas_toggle_output', function() {
    return sprintf(
        '<li class="slideout-toggle menu-item-align-right"><a href="#">%s</a></li>',
        'YOUR CUSTOM HTML HERE'
    );
} );

Let me know :)

Works perfectly!
Thank you :)

You're welcome :)

This archived topic is closed to new replies.