0

I am using wp_list_pages. I am unable to change page title For eg:- I made a page with name lorem ipsum and want to show in content area the same name i.e lorem ipsum. But in menu, I want to show the name lorem. How to do this.

3
  • 3
    consider creating a custom menu with wp_nav_menu() codex.wordpress.org/Function_Reference/wp_nav_menu which should allow what you want; codex.wordpress.org/Appearance_Menus_Screen
    – Michael
    Commented Nov 15, 2011 at 12:08
  • Michael is right. You can then enter a "Navigation Label" to use just for the menu while the actual page title stays untouched.
    – Geert
    Commented Nov 15, 2011 at 12:55
  • Yes, you are rite, but i want 100 menu items. and due to my server problem, i am not able to show 100 menu items, it does not display above 65 items.
    – user930026
    Commented Nov 15, 2011 at 13:38

1 Answer 1

1

@Michael is right using wp_nav_menu() is the easiest route to go for this. If your menu (with your server problems) is only allowing to show 100 items you could consider splitting it up in to two menus.

Using wp_nav_menu() is the easiest way to go and creating two menus using the label atribute is equally easy.

First you would register the menus. This code gets added in your theme's functions.php.

// This theme uses wp_nav_menu() in two locations.  
register_nav_menus( array(  
  'primary' => __( 'Primary Navigation', 'your_theme_name' ),  
  'secondary' => __('Secondary Navigation', 'your_theme_name')  
) );

This will register two menus. Then put this where your menu is to go in your theme:

<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'secondary' ) ); ?>

Then style it how you want so that they work seamlessly together.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.