0

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.

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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