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 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
add comment

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

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

1 Answer

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
add comment

Your Answer


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