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

I have created a menu called "My Menu" in wordpress using Menus feature provided under Wordpress admin panel. I have added 3 pages into it named Page A, Page B, Page C.

I have applied featured image to all these 3 pages. Now what I want to do is, I want to create a code that will loop through this "My Menu" and print all 3 featured images of these 3 pages.

How can I do that ?

Thanks in advance.

share|improve this question

migrated from stackoverflow.com May 6 '12 at 19:32

This question came from our site for professional and enthusiast programmers.

You have to add a custom walker to the wp_get_nav_menu. You can try a loop through wp_get_nav_menu_items as well

share|improve this answer

Your Answer


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.