Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #26909
    mht23
    Member

    Hello,

    I use a secondary menu for my site and when viewing on a mobile device the menu is visibly named “Secondary Menu” – if possible I’d like to rename this to something else.

    Any help appreciated

    Thanks

    #26934
    Sakin
    Keymaster

    @mht23: For this we need to add JS code in “Appearance => Theme Options => Tools => Header and Footer Codes => Code to display on Footer” box. But for that I need to your site URL and The name for the secondary menu.

    #26978
    mht23
    Member

    Hi, thank you for your support. The website is http://www.harrogatetoffees.com/ and I simply want the Secondary Menu to be called Menu

    Thanks

    #26984
    Sakin
    Keymaster

    @mht23: Can you try adding in the following script.

    <script type="text/javascript">
    jQuery(window).load(function() {
    
    //Remove Old Primary Menu 
    jQuery( "#tinynav1" ).remove();
    //Remove Old Footer Menu
    jQuery( ".sb-holder" ).remove();  
    
      // Secondary Menu
      jQuery('#access-secondary .menu').tinyNav({
    	active: 'current-menu-item',
    	header: 'Menu' 
      });
    jQuery(".tinynav2").selectbox();
    
    });
    </script>
    #27078
    mht23
    Member

    Perfect – thanks again.

    #27149
    brendon
    Member

    I also tried this and it does successful change the name of the menu from ‘Secondary Menu’ to ‘Menu’. There is a brief time before the script runs where it says ‘Secondary Menu’, but I guess that’s nitpicking. What is a problem though is that the first item in the Menu which tries to navigate to a url off the base called Menu and as I do not have a page with the slug ‘menu’ I get a ‘Oops! That page can’t be found.’ Ideally that first item Menu should not be there in the list when in mobile view.

    #27156
    Sakin
    Keymaster

    @brendon: In next version, we will remove the header of the Menu. So, you don’t need to add any of these script. You can just remove it after next version update. Yes, I understand there is delay in the script. Can you try moving it to “Appearance => Theme Options => Tools => Header and Footer Codes => Code to display on Header” box as below:

    <script type="text/javascript">
    jQuery(window).load(function() {
    
    //Remove Old Primary Menu 
    jQuery( "#tinynav1" ).remove();
    //Remove Old Footer Menu
    jQuery( ".sb-holder" ).remove();  
    
      // Secondary Menu
      jQuery('#access-secondary .menu').tinyNav({
    	active: 'current-menu-item',
    	header: '' 
      });
    jQuery(".tinynav2").selectbox();
    
    });
    </script>
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Renaming Secondary Menu for mobile users’ is closed to new replies.