WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Something like this. I would like to get only the second level menu items, not their parent items.


  • Sub Menu Item 1
  • Sub Menu Item 2


  • Sub Menu Item 3
  • Sub Menu Item 4

For example, from this list I'd like an output of something like.

<ul id="home_submenuitems">
    <li>Sub Menu Item 1</li>
    <li>Sub Menu Item 2</li>
<ul id="about_submenuitems">
    <li>Sub Menu Item 3</li>
    <li>Sub Menu Item 4</li>


I have been at this for weeks now, no answer I found on this site or any other has helped.

share|improve this question

marked as duplicate by toscho Nov 4 '13 at 13:47

This question was marked as an exact duplicate of an existing question.

I do not know how good your programming skills are, but the example under Using a Custom Walker Function here should give you a good idea of what you have to do. If you need further advice, comment

share|improve this answer
Can you please make this a real answer - take a look at How to Answer. – ialocin Nov 4 '13 at 11:53
Still learning, as well, but I think it obeys this rule: "but it should also include “try this instead”. Any answer that gets the asker going in the right direction is helpful [...]", doesn't it? – user9 Nov 4 '13 at 11:55
Sure, but dropping names and links is just not always as helpful as one might think. For example the possible duplicate i suggested offers way more information on the specific topic then your link; and I didn't posted that as answer for a reason. Besides that, I'm just saying, if you're able to provide a real solution, not just a hint, do it. – ialocin Nov 4 '13 at 12:13

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