My parent theme (html5blank) has 3 menus set up my default in it’s functions.php. I want to amend their names in my child theme so they make more sense for my client.

I’ve tried copying the code into my child theme functions.php and renaming the register_html5_menu function but it won’t work as there’s no reference to the menus in the templates – presumably because this function is related to the CMS?

Here’s the code from the parent theme:

function register_html5_menu()
{
    register_nav_menus(array( // Using array to specify more menus if needed
        'header-menu' => __('Header Menu', 'html5blank'), // Main Navigation
        'sidebar-menu' => __('Sidebar Menu', 'html5blank'), // Sidebar Navigation
        'extra-menu' => __('Extra Menu', 'html5blank') // Extra Navigation if needed (duplicate as many as you need!)
    ));
}

Can anyone think of away to amend the names/possibly add new menus via the child theme functions.php?

Also, what is the second ‘html5blank’ name for? “Header Menu” is the only thing that shows up in the CMS and I see these ‘second comments’ throughout the functions file. Just wondering what they do, if anything?

Read more here: Change WordPress menu names in child them


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: