I don’t think so, but you could use get_children and get the attachment(s) of those posts:
$attachments = get_children(array(
'post_parent' => $post->ID, // <- source post
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'post_date',
'orderby' => 'DESC',
'numberposts' => 5, // the number
));
Then get the image URLs:
$size="post-thumbnail"; // or whatever size you need
foreach($attachments as $att){
list($source, $width, $height) = wp_get_attachment_image_src($att->ID, $size);
// echo '<img src="'.$source.'" width="'.$width.'" height="".$height."" />';
}
Related Posts:
- Fullscreen gallery plugin [closed]
- Any plugins that upload, resize, and display images? [closed]
- Display Facebook photo albums and photo comments?
- Is there a plugin that provides a stackoverflow style editor for wordpress? [closed]
- Who are the most trusted plugin developers? [closed]
- Open Source Forum for wordpress similar to stackexchange or stackoverflow [closed]
- Validation error: Extending Gutenberg gallery block
- Send email when a new post is published [closed]
- How to transfer a WordPress blog to a different domain?
- Membership / subscription plugins – alternatives [closed]
- Email Notifications of new posts to users – suggestions [closed]
- How to override normal WordPress search in Buddypress? [closed]
- Library plugin for WordPress [closed]
- Markdown in WordPress 3.2?
- Integrating Google Maps with custom marker and hover?
- Network-Wide Plugin Settings Management
- Quote rotator in the sidebar
- Image Crop/Resize Function/Code Sinppet/Plugin to adjust/crop images during upload
- Recommendationf for Quiz Plugin that saves results [closed]
- Conditional Display of Links in Widgets
- WordPress Plugin for One-Time Event Registration? [closed]
- recommended breadcrumb plugins with possibility for hiding “Home” link [closed]
- Looking for a WordPress plugin to show five latest tweets one at a time? [closed]
- Is there a good plugin for social bookmarking on site for WordPress [closed]
- Automagic Link Shortening for Non-Hosted WP
- Storing image gallery plugin data
- Peer Review Plugin for Posts? [closed]
- How to restrict an entire WordPress site to visitors, but the register and login page?
- Duplicate a Multi-Site Subdomain
- Is it possible to integrate WordPress *posts* and social media (Facebook, Google+, Twitter)? [closed]
- New Plugin: Post update pushes a copy as a revision
- Is there a plugin to record querystring parameters for a page (for customer tracking)? [closed]
- problem with nextgen plugin
- How to Implement “Notice: This theme recommands the following plugin:xyz” in wordpress? [closed]
- Display comments of users on single page
- How to add a random image to a post from gallery and only show one?
- Plugin for gallery with thumbnails?
- How do I turn a custom post type into a plugin?
- How can I implement a notification system in wordpress?
- Does a wordpress plugin (not a membership one) exist for selling access to some webpages? [closed]
- How to make an interface similar to multi-site for switching between multiple (single) sites for administrators?
- How to make a customize role and view a specific plugins base on that role?
- Debugs/errors in oqey gallery
- How can I disable widget from being visible on some pages?
- Information and Videos for Customers in the Backend [closed]
- Is any gallery plugin available to generate galleries from existing uploaded images? [closed]
- How to create an archive page (with links) for a date range?
- How to create a managed image repository in wordpress
- What plugin should I use for booking events and receiving payments? [closed]
- Theme is Causing Ajax Conflicts for a plugin I cant identify it
- Removing an action from wp_footer called in a class that’s inside a bigger class
- WordPress plugin/theme or other wayout to create portable pages?
- Paypal Integration [closed]
- Is there a WordPress plugin that can post to Google+? [closed]
- Limit the amount of words displayed by the Latest News plugin, or recommend an alternative [closed]
- Retrieving links and names of images from a NextGEN gallery [closed]
- Plugin to hide image in excerpt
- HelpDesk solution for WordPress [closed]
- Basic gallery plugin suggestion [closed]
- How to automatically add edit link on frontpage post of any wordpress theme?
- How to install Google Analytics onto site without internet access
- Short messages widget [closed]
- I want to know about the plugins that help in while I write code on my Page? [closed]
- Hotel reservation plugin you would recommend [closed]
- Is there a plugin to turn comments into structured reviews [closed]
- Moving to a WordPress blog. What do I need to know?
- Free paypal cart solution [closed]
- How to have a gallery in which each image’s caption is a whole “post”?
- How to completely hide a WordPress/BuddyPress Install? [closed]
- WordPress as heavily personalized content management portal, and somewhat like dropbox [closed]
- Advanced custom fields and Slideshow gallery desn’t work together? [closed]
- Create Short code dynamically
- Adding Gallery to Footer of Homepage
- Can I remove an image from the Gallery without deleting it from the Media Library?
- Plugin to create unlimited custom shortcodes?
- jQuery gallery plugin to interface with Picasa
- Looking for a photo gallery plugin [closed]
- How to get Recent Post From Each Category with Thumbnail?
- Adding custom Field To The Posts Listing
- WordPress Gutenberg custom block
- Elementor Sidebar not loading when PRO elements plugin is active
- How to add gallery to post and make seperate album page with gallery link to post?
- Access remote SFTP server via WordPress login?
- How to update all in-site redirect URLs to destination URLs at once
- Custom Gallery plugin uploading to different dir, and post to page
- Render Shortcode in Lightbox Gallery
- How to create a dashboard for logged-in users with custom functionality? [closed]
- Posted posts scheduling to unhide for new members
- Automatically send an email to list when blog is updated
- Making a particular kind of search engine with WordPress?
- Looking for a related post plugin which slides-in like the one at inc.com does [closed]
- Is there a WordPress Plugin like Imsanity that keeps high resolution originals? [closed]
- Facebook like plugin with Multi Option-Needed [closed]
- WordPress Plugin for Maps of specific Tweets? [closed]
- How can I create a navigation menu in the sidebar that can also act like a slider?
- Looking for a home page carousel [closed]
- Need a Plugin to create a registration form for my website? [closed]
- Slider Plugins for header [closed]
- Take Elementor For Email FIeld Check if user is registered. IF not registered then register on woocommerece
- What are Seeds? [closed]