[Resolved] Changing Off Canvas Slide Out Menu Icon

Home Forums Support [Resolved] Changing Off Canvas Slide Out Menu Icon

Home Forums Support Changing Off Canvas Slide Out Menu Icon

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1269653
    Jasmine

    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!

    #1270939
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #1272971
    Jasmine

    Works perfectly!
    Thank you πŸ™‚

    #1274114
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.