Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I was reading Wordpress documentation and also trying to find some clear example of how to do this but I couldn't, sorry if this is posted elsewhere but I did my best trying to find an answer before posting.

My question is simple, if I use the wp_nav_menu function of wp, what should I do in the array or any other place to show one specific element and it's childs.

So for example, I have a menu Home, About, Services. My question would be how to show only Services for example with it's childs.

Is that even possible? Thanks in advance.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

After searching some more I found this great answer, they key was to use a custom walker.

Display a portion/ branch of the menu tree using wp_nav_menu()

Best.

share|improve this answer
    
Hi @Jaypee. Great that you found a solution! You can select your own answer as the accepted answer. –  Lea Cohen Mar 20 '13 at 6:24

Why would you only want to display one item from a menu of many items? You can create additional menus by registering them in your functions.php file and then associating then in the Appearance -> Menus area of the WP-Admin.

http://justintadlock.com/archives/2010/06/01/goodbye-headaches-hello-menus

share|improve this answer
    
Thanks for your answer, but the thing I'm looking for is to not have to create new menus (that will be like a part only of the main menu) indeed. That's why I'm looking to only show a single item of the main menu. Get my point? Thanks! –  Jaypee Aug 23 '12 at 19:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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