I guess you need this function
get_the_post_thumbnail_url($menu->object_id);
(provided menu item is not a custom link)
$menu->ID is not the id of the post/page it is linking to.
About calling meta yes it is also possible
$image_url = get_post_meta( $menu->object_id, 'meta_key', true );
Related Posts:
- Parsing Menu Items and Blog Posts
- Disable Attachment Pages Completely
- Print number of post (in reverse)
- WP Insert Post function – Insert Post Thumbnail
- Trying to add attribute to my posts’ featured image
- Best practice for migration friendly images in posts/pages?
- get_the_title() gets printed out twice
- Redirect to another page using contact form 7? [closed]
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- Display related posts without a plugin
- Show About and Contact Us page when they’re clicked in the top menu.
- Apply class to every third list item? [duplicate]
- Error display post thumbnails for previous and next post
- How to pick “full/thumbnail” images in the loop?
- WordPress Search
- Edit and delete permissions pages and posts
- My worpress search page is showing no results
- How can I check if a post with a particular slug or title exists?
- How to put 2 php codes in functions.php without site crashing
- Split post or page content in two or more columns
- Having trouble with customizing blog posts on the home page
- Getting page / post URL on publish and / or update
- Get current_post in reverse order with pagination
- Basic PHP question (displaying post title over thumbnail) [closed]
- insert thumbnail image from php script
- Can’t put a hyperlink on Featured Post’s Image
- List of child pages fetch next results at link click
- What’s the best way to include PHP code in pages?
- Why is a wp function used in current PHP namespace’s callback not resolved to global scope?
- Load Posts on Click via Ajax into a DIV
- How to catch wordpress post ID when it’s published
- set post limit at load more ajax wordpress
- WordPress query undefined offset in loop
- Find Site ID From WP_Post
- WP_Query: getting posts where custom field exists
- page-slug.php not working but only for specific slug
- Need php code’s output to display underneath a Divi Module
- Insert page content into another page with a changed variable
- Add value to new attribute inside WordPress menu items
- Array to string conversion on array_map
- Store metakey value as an array
- Increment paged on WP_Query
- Only show first image in foreach loop
- wp_nav_menu not working correctly in my underscores theme
- Using featured image of blog archive page
- if custom field doesn’t exist, use post thumbnail instead, as image background
- How to echo every parent page title?
- How Do I Find & Remove H1 From Site-Title-Wrapper? [closed]
- How to use mysql LIKE with wpdb?
- Reading settings in the home page precisely home.php
- Do I need to edit my theme in order to change the title of my blog page?
- Add new post in existing categories using wp_insert_post
- WordPress upload file size error even after raising php limits
- Menu Items fail to save correctly, cause reset of related page metadata
- How do I add more options to the post-new.php page?
- Dropdown menu for categories
- Menu Custom Data Attributes
- How to display different submenus?
- get post id from wp_insert_post for get_template_part
- Help Fallback (thumbnail)
- Retrieve Json data and create multiple pages with it
- create front-end users post list by specific category
- Incrementing PHP variable onclick to display posts by month
- Modify main query before it run without pre_get_post
- Displaying list of posts in category page
- Get the name of menu item with wp_nav_menu
- How to add page numbering with php?
- Display child page content of a specific parent on home page
- .html end of URl affected to SEO?
- How can I get “Previous” and “Next” to show in the navigation besides the links?
- Notice: Trying to get property of non-object
- Get the id of all images in a post
- How to set the mainpage of a custom post type?
- Get featured image with custom size outside WordPress
- Noindex subscriber author page
- How to add post thumbnail dynamically using Jquery?
- Displaying content on posts page based on category
- Do not duplicate posts with multiple categories in multiple loops
- How to use wp_nav_menu to create custom dropdown menu?
- how to make an array of post id’s in is_single
- Else/If Statement to Display Photo Descriptions
- Loading Posts & Category with Ajax
- How to modify mobile nav menu text in theme
- Four posts per row [closed]
- Get parents child pages
- array_rand not working correctly?
- Output only links using wp_nav_menu()
- Update if post with specific title exists
- How to set a featured image (thumbnail) with PHP?
- Need help removing […] after excerpt
- Get css class of menu item in custom menu structure
- How to change thumbnail src attribute?
- How to add aria role and schema markup to custom walker container
- show recent posts php code error?
- How can I use custom menus with a Bootstrap WordPress theme?
- Removing custom sort order from admin page listing
- WP_Query() load selected post
- Nav menu from plugin to theme
- Adding Additional Variables on Menus Page
- Post to WordPress from another Server via PHP