GeneratePress: Change the Mobile Menu Label
Changes the "Menu" text next to the hamburger icon in GeneratePress, or removes it so only the icon shows.
Opens WPIDE on
Code
// Text next to the menu icon.
$wpide_gp_menu_label = 'Browse';
add_filter( 'generate_mobile_menu_label', function () use ( $wpide_gp_menu_label ) {
return esc_html( $wpide_gp_menu_label );
} );
Notes
Set the label to an empty string to show the icon only; screen readers still announce the button.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.