• Is there any filter that I can change the text of hamburger menu? By default, it’s showing as “Menu” and coded in header.php file. I don’t want to edit directly to the header file, in case of updating.

    What I am doing now is copying header.php file to my child theme, then editing from there. But if there is any filter that I am doing in functions.php, I feel better.

    Please suggest.
    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi there,

    I don’t know of any way to do this via functions.php, no. You’d need to modify the content of this line in header.php instead:

    <button class="menu-toggle" aria-controls="menu" aria-expanded="false"><?php _e( 'Menu', 'sela' ); ?></button>

    But you can also do this using CSS – you can add this to Additional CSS in the Customizer, or in the style.css file in your child theme:

    button.menu-toggle {
    	font-size: 0;
    	height: 54px;
    }
    button.menu-toggle:before {
    	top: 0;
    }
    button.menu-toggle:after {
    	font-size: 1.4rem;
    	content: "new label";
    }

    It’s a bit hacky, but it works ??

    Thread Starter hungpham

    (@hungpham)

    Thanks. Another option ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘change text of the hamburger menu’ is closed to new replies.