Public Ticket #2076599
Changing Name of Mobile Menu Item


  • Michael Reid started the conversation


    I would like to change the name of the menu (on Namba Theme) that displays when viewing my site from a mobile device.

    Currently, when one view's  the mobile version, they would see "Menu" and "Info".  

    I would like to change the text "Info" to "Sponsors".

    It seems that I would have to change the <span> for Id="mobile-info-btn"

    How can this be done?


  •  956
    Marc replied

    Hi Mike,

    you can use the Loco Translate plugin to create a translation file for the theme. Technically this plugin only replaces theme strings like "Menu" and "Info" to the specified values and this can be used to either completely translate these strings into another language or simply to change the default strings.

    You'd create a language file for the theme with the chosen language of your WordPress installation (Dashboard → Settings → General).


  • Michael Reid replied

    Hey Marc,

    Thanks for the reply. Quick follow up on that.

    Before you had answered before, I had attempted to find the line of code in the header.php and modify it myself. 

    Would the below modification be something that I should avoid or is it okay, less the theme is updated and my changes are erased?

    Would this be safer if I modified it using a child theme?

    Below is what I modified:

    Path: Appearance / Theme Editor / header.php

    Original: <a href="#nav-mobile" id="mobile-info-btn"><span><?php _e('Info', 'namba') ?></span></a>

    Modified: <a href="#nav-mobile" id="mobile-info-btn"><span><?php _e('Sponsors', 'namba') ?></span></a>

  •  956
    Marc replied

    Hi Mike,

    the code change is totally fine, but using a child theme would be the best option. A child theme allows you to add more complex changes in the future. In addition to being update safe a child theme helps troubleshooting issues in case any will occur in the future.