I’ve created a custom menu using pages. For a lot of the list items, I’ve specified a custom menu title for the page… So, the About Us page becomes About on the menu, for example. Then, when the page title is changed, it’s changing the title on the menu as well. So if I change About Us to About Our Company the menu is getting changed from About to About Our Company.
Is there a way to change the default in WordPress, so those custom menu titles are the default instead of the page name?
From header.php
:
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'sort_column' => 'menu_order',
'container_id' => 'nav',
'container' => 'div'
) );
?>
From functions.php
:
register_nav_menu( 'primary', 'Primary Menu' );
Are you in Appearance > Menus? Is that what you mean by custom menu? Can you share the code you are using to make the menu display? I have this in my header:
Where topnav is the name of my custom menu. You have to add the pages to the custom menu in the “Custom Links” area, if you just use the “Pages” and checkboxes, then it will default to the Page title.
Hope this helps!
Check that the option to Automatically update Top Level Menu Item’s isn’t selected in the Nav Menu options screen. If that doesn’t do it, maybe your menu’s aren’t registered correctly. Try re-arranging the top level items and see if it changes on the site. If none of that works,try posting the code used to display your custom menu (the
header.php
code and thefunctions.php
code that registers the menu).