First refer to this answer by @MikeSchinkel. You can put the function in functions.php
Next, just add echo robins_get_the_excerpt($post->post_parent);
below the image attachment. Like this :
<div class="caption">
<?php echo robins_get_the_excerpt($post->post_parent) ?>
</div>
Please note that this code is untested.
Related Posts:
- How to delete resized (cropped) image uploads and prevent future resizing?
- How to display a page’s featured image?
- Featured image shortcode
- Displaying images from external RSS feeds?
- Why should I use “Organize my uploads into month- and year-based folders” option? (Cons/Pros)
- Cropped featured image replaces original image in gallery
- Displaying images with relative paths in the editor
- Prevent image upload unless exact size
- Use Media upload in custom widget on wordpress 3.5
- Theme Customiser Image Control
- Fixing external image urls
- Associate an existing image with a post
- Need help building a filter to edit the output of “image_send_to_editor”
- How to remove title attribute from gallery links and images
- How to upload image without post ID using the new media uploader?
- How to default all users to no link for attachments?
- How to output placeholder image if no featured image set?
- Featured Images on Front Page
- Display different header images based on current page
- Why images/photos after being uploaded to my wordpress site get slightly blurry?
- Responsive Images Resizing Images
- hardcrop images in gutenberg “latest posts” block
- Get uploaded image path in wordpress by filename
- Gallery post images on homepage?
- Use Gravatar as fallback image if no local image is not found
- add the post as canonical for attachment page wordpress
- How to get image ID to use inside wp_read_image_metadata()?
- Add “data-” attribute to image links
- How can I make all post image uploads have data-width and data-height attributes automatically by default?
- Large size image breaks template layout
- Replace original image, WP image editor
- WP Responsive images – upload custom image sizes
- Images not loading after migration
- Disable all resizing and compression
- Update old Post image metadata to ‘thumbnail’ wp_attached_file
- Control Responsive Images
- How to post a mosaic of an image gallery instead of the entire gallery inside a post’ [closed]
- How to throw admin notice error on image upload
- Get size of smaller image version
- How to add an image to the post preview in the free theme “food recipes”
- I am getting useless alphabets in images link
- using media_sideload_image with a file from theme directory
- wp_get_attachment_image_src() returning incorrect width and height [duplicate]
- Blank upload.php page
- Unable to upload images to the Media Library. Getting this erron on the console wp-admin/async-upload.php 403 (Forbidden)
- WordPress shows my picture in admin bar
- Missing background image setting in admin of twenty nineteen
- Image editor is not loading
- Using jQuery to automatically add class only to gif images in WordPress database [closed]
- Modify RSS – remove image and add text
- Retrieve Image Attachments Getting Post Thumbnail Image First
- Is there a wordpress filter to edit the markup of inline images?
- How can I check if the first block is an image aligned left or right?
- How would you add sequentially numbered labels to images in posts?
- Alt text not showing up
- Can wp_get_image_editor convert to icon?
- Product Images Low Quality After Updating From WP 3.5 to 4 [closed]
- How can I change the to for lazyload wp smilies
- How to post images on my blog with a pre-defined border
- Output posts attached images as thumbnails linked to full-size with lightbox class
- Making a parent directory writable by the server
- How to add a custom class to all the images for a page only?
- my featured image of wordpress are not showing in the front end though image are uploaded in media library
- Images getting smashed
- Unset image sizes before images are uploaded
- Wrap post images with a link, not figure (image_send_to_editor doesn’t work)
- An error has occurred during the upload process in wordpress 5.3.2
- get_the_post_thumbnail() title and alt attributes not displaying
- What is the best way to host a site with many images without it being too slow?
- Show featured image in all posts
- How to re-arrange images in default WP Gallery more than one image at once?
- Jetpack Lazy load images fade in
- add alt text to images loaded from json with media_sideload_image
- WordPress images programatically display error
- Load only imagens resized in custom page
- How to inject alt and title attributes for every image in each post into HTML?
- How to see previous –next image option in the theme?
- Put image onto header
- Getting the Select and Crop Functionality Using Custom Fields
- Displaying “alt” attribute text as captions?
- Display images in template file
- Need help making my homepage blog image smaller than my post image
- After I upload a file to library its name converted to dashes
- Image to only show up in the single post page, not on the blog/home page
- Changing image size displayed in wordpress twenty fourteen theme
- How do I display image files as links?
- Only User Upload image Http Error
- See the all uploaded images of a user as an admin
- Broken Media Library
- wp_get_attachment_image_src() does not return what I want
- 3.5.x Theme Customize: Handling Custom Control Requests
- Wrap a post image with a div if it doesn’t have a caption
- Images in sub-pages fail to load
- How do add custom class and id to the that is generated from media gallery insert image into post [duplicate]
- WordPress Bootstrap dynamic carousel showing images separately not as carousel
- Adding different classes to different images depending on size for fine control of image layout in posts
- How to display image ALT under image?
- Faster image upload on mobile [closed]
- Delete all thumbnails & regenerate them?
- Gutenberg block HTML image rendering override