-
st Note:
// Prepare the code for safety $images = $wpdb->get_col( $wpdb->prepare( " SELECT ID FROM %s WHERE post_type="attachment" AND ID IN ( %s ) ORDER BY menu_order ASC ", $wpdb->posts, $meta ) );
-
nd Note: Look into what you already got:
// Inside the foreach loop echo '<pre>'; var_dump( $att ); echo '<pre>';
-
rd Note:
wp_get_attachment_metadata()
gives you meta data. Just drop the post ID in there.
Related Posts:
- Get Image Description
- How to have different captions for same image, for galleries?
- Featured image shortcode
- Upload multiple images in a custom metabox
- How to wrap WordPress image captions inside H2, H3 tags?
- Adding upload button in metabox
- Is there a way to define a default caption to all uploaded images
- How to add a link in a image’s caption?
- Alter media caption/description conflict in WordPress?
- How to display a shortcode caption somewhere other than the_content
- Caption in Page adding unwanted 10px to width
- Adjust image caption within visal editor
- Drag images with caption in WP editor
- Different captions for the same image in multiple galleries. Edit Image in Gallery locally
- Image display from custom field
- HTML tags in WordPress image caption
- Add attribute to caption shortcode from custom attachment field
- Removing height and width from images with a caption
- Include caption underneath post images
- Turn off image captions in gallery view?
- Move Image Captions Inside Link ( tag) if Added
- How to add custom classes to figure element only if image has caption?
- Replace image caption with its title and description
- Omit image captions from get_the_content()
- Add custom metabox to media library images
- WordPress Featured Image meta box not showing
- Image not showing using a custom function and get_post_meta
- Random home page background images with caption text
- How to edit caption for images and exclude it from excerption query?
- Metabox image upload value
- Place image caption outside of figure tag (Gutenburg Image Markup)
- How to join Caption AND Description Meta Fields as one combined-caption in Image Block
- how automatically show the image title before the image caption/description in a wordpress gallery?
- How to Display Image Caption but Not Alt Text
- How to auto add image caption from image alt?
- Is there a way to create referable automatic numbering in image captions?
- featured image in custom poste type (backend)
- Displaying “alt” attribute text as captions?
- problem with updating metabox of upload image
- page displaying media caption shortcodes
- How to add a credit line to a photo caption
- Upload button in metabox not working
- Wrap a post image with a div if it doesn’t have a caption
- Adding different classes to different images depending on size for fine control of image layout in posts
- CSS how to target the caption of one individual image?
- Customize all image captions
- show hide image script after 4 seconds [closed]
- Restricting users to view only media library items they have uploaded?
- How do I disable responsive images in WP 4.4?
- Filter to remove image dimension attributes?
- How to get a list of all the possible thumbnail sizes set within a theme
- How do I get the avatar URL instead of an HTML IMG tag when using get_avatar?
- Image Upload from URL
- Programmatically adding images to media library
- How do I delete all UNUSED images from my uploads directory?
- Set default image sizes in WordPress to hard crop
- Is it possible set a featured image with external image URL
- get attachment title based on attachment id
- Stop wordpress from hardcoding img width and height attributes
- Handle issues with change of image scaling (rounding) in 4.1 (WP Ticket #18532)
- Programmatically get images by URL and save in uploads folder
- Prevent WordPress from generating medium_large 768px size of image uploads?
- remove or update add_image_size
- How to extend the gallery block in Gutenberg?
- Image quality based on image size
- Function to get URL of original uploaded image – full size
- how to get original image using wp_get_attachment_image_src
- What is a good alternative to using $content_width for image optimization?
- get the attachement url for the medium sized image
- Can I attach image to post without adding it to post?
- Automatically replace original uploaded image with large image size
- WordPress crop tool greyed out
- How to scale up featured post thumbnail?
- Upload images to remote server
- Custom image size / thumbnail – Crop to aspect ratio even when source image is smaller than set dimensions
- Each custom image size in custom upload directory?
- Getting Images from theme’s directory in pages
- Set default image link target in Gutenberg image block
- Add an alignment option for images
- How to delete resized (cropped) image uploads and prevent future resizing?
- How to automatically add rounded corners to thumbnails?
- WordPress adding scaled images that don’t exist (1536×1536 and 2048×2048)
- Download an image from a webpage to the default uploads folder
- Add image size where largest possible proportional size is generated
- WP 4.4. responsive images browser choosing the “wrong” one
- After Moving a Site to Another Domain, All Images Are Lost
- Prevent WordPress from adding image’ title automatically
- Overide Gallery Default Link to Settings
- Retrieve featured image
- How to change image type for specific size?
- Add new image size to media uploader so users can insert into post?
- How to insert pictures without hard coded dimensions?
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- How to modify image editor dialog options on WordPress?
- Why WordPress automatic cropping all my images?
- Allow contributor role to upload images and not edit already published articles
- What’s the proper way to find and remove duplicate images from posts and the media library?
- Remove images (files) that were generated when using add_image_size()
- get_post_gallery with Gutenberg
- Is there a hook which fires after all thumbnails are generated?