the following should just show the caption:
echo '<div class="slideshow-content"><img src="'.wp_get_attachment_url($attachment->ID, 'thumbnail', false, false).'" /><div class="captions">'.apply_filters('the_excerpt', $attachment->post_excerpt).'</div></div>';
(applying the excerpt filter adds the paragraph tag automatically)
Related Posts:
- Get Image Description
- How to have different captions for same image, for galleries?
- Featured image shortcode
- How to wrap WordPress image captions inside H2, H3 tags?
- 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
- Include captions
- HTML tags in WordPress image caption
- Add attribute to caption shortcode from custom attachment field
- Removing height and width from images with a caption
- 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()
- Random home page background images with caption text
- How to edit caption for images and exclude it from excerption query?
- 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?
- Displaying “alt” attribute text as captions?
- page displaying media caption shortcodes
- How to add a credit line to a photo caption
- Wrap a post image with a div if it doesn’t have a caption
- How to change image type for specific size?
- add_image_size() zoom-crop
- Which are precisely the predefined image sizes?
- Change Image URL to a CDN
- Responsive Images – Add srcset attributes to custom Images Function
- Getting custom size image URL
- Retrieving images from a NextGEN gallery
- Loss of sharpness in jpg imported as header in twentyeleven
- Getting alt text of featured image
- How to resolve – IE 6 ignores img “width” properties
- WordPress is stripping the Alt tag’s quote marks from images where Alt is not set, but leaving the word ‘alt’ creating problems for ADA compliance
- WordPress reduces the full size image and uses it as the original
- Show taxonomy list with taxonomy images ( SOLVED)
- get the image of the post
- Is There A Way Of Using the_post_thumbnail() to Pull In A Specific Image From The Media Library
- ACF Image ID, echo the alt tag
- Change WordPress Media Manager
- How to stop images from being wrapped in tags?
- Out of memory error reporting
- How do I create an alternate RSS feed for tags with custom image sizes for MailChimp?
- How can I create more upload paths, like a post corresponding to a post title folder used to store images of the same product
- Every admin only can see his uploaded images im editor
- Update an image block style programatically
- Resize into square the single product image in woocommerce without cropping [closed]
- an error occurred in the upload. please try again later (Maybe File Permission Issue)
- Image Upload HTTP 500 Internal server error
- Animated GIF on WordPress posts? [closed]
- Generate images to be associated for tag and category?
- Different background images on different sites [closed]
- I have no images in an activated wp theme
- How to know what size image to use for background? [closed]
- Understanding WordPress image sizes and responsive images
- Image large size [closed]
- Google Page Speed Insights – Optimize Images
- Partial img lazy load with WP 5.5
- Why doesn’t WordPress use the smaller sized image?
- css to fit image by HEIGHT
- Alt Image WordPress [closed]
- Some Images Disappeared from Media Library?
- What is required in the hosting environment for WordPress to process an image into multiple sizes?
- Get an image from url, resize it, and save on a custom folder (not the media library)
- Moving an image to the side [closed]
- How to add thumbnails to posts and pages automatically in a uniformed fixed elegant way?
- image upload/edit is broken: “Image data does not exist. Please re-upload the image.”
- Background Image Does Not Display on Page
- Can’t fix corrupted images
- Deleted Image giving a 301
- Avatar picture is broken
- WordPress append -1 to the image name
- wpdb function for filtering the images by title
- Link to products with the same image title (woocommerce)
- WordPress does not load most theme images
- There is an image embedded on my page that I can’t locate in order to delete. Please help me!
- How to add featured image use HTML
- Correct color profile and saving? Thumbnail creation?
- stop wordpress from resizing feature gif images
- Modify media file markup output
- Theme page headers and rotator images not assigned after website migration
- WPML – Change media uploader language
- WordPress Is Saving Original Image Only
- Display images from JS?
- Create a custom attachment thumbnail for quick page load
- Change the image for a certain URL
- How to make an image bigger with wp_get_image_editor
- Post migration – images do not display
- Display Images from Array with wp_get_attachment_image() [closed]
- WordPress Theme: replace logo image with title site if file doesn´t exist on server