Your question doesn’t show any code examples or tell me a lot about what you want to show in the caption, so I’ll leave that out and make up my own code.
Here is one way to show a caption on hover using jQuery: https://jsfiddle.net/steckinsights/yzfpg7n0/25/
Now, doing this with a gallery means that you’ll need to do a lot more to this (looping through the images, wrapping the image and the caption in an element, adding a unique ID or class to the image and caption) but this is a basic answer to your question of how it could be done.
One of many ways including:
- Set image as BG image and use the
::after
CSS element to display comment - Loop images with PHP and pull comment from alt tag using jQuery
- Use one of many plugins that do this out of the box
- etc.
Related Posts:
- Creating a photo gallery in WordPress [closed]
- How can I alter the [gallery] markup?
- Make a really simple gallery structure
- Best approach when modifying the Media Manager
- How to show description under an inserted image?
- First three images in post excerpt
- Add option to “Gallery Settings” section
- How I can get image description/title/alt for gallery image?
- WP_Editor – Remove TinyMCE Toolbars
- Define size for `get_post_gallery_images`, they seem to have been resized to 150×150
- Proper Way to Remove Thumbnail Links In Gallery
- Disable Linked Gallery Images If Mobile Browser
- Possible to add same caption to all photos in a gallery?
- How to Add a Custom Colum on Thickbox Media Gallery Tab?
- WordPress 3.5 Gallery Menu Order not set?
- How to get post attachments in gallery post format template
- NextGen – Display Image Count Per Gallery
- have WP Gallery display the title instead of caption
- Changing Gallery images size?
- How do I use two different images, one as a thumbnail and one as a linked image?
- How to get ID of images used in gallery?
- Add data attribute to a gallery link?
- How can I show these pictures in two columns in my page?
- What is a good way to implement photo galleries on WordPress?
- Display latest 10 galleries
- Gallery set to “Media file”, showing as attachment page
- Gallery Only Displaying One Thumbnail
- WordPress grab first image from gallery
- How can I create a gallery showing Ken Burns effect, when mouse hovers over images? [closed]
- Set default number of columns in gallery
- ACF gallery hook?
- Get attachments but only from post gallery?
- WordPress show Gallery Title and Captions
- In which version of WordPress was the new gallery shortcode implemented?
- Fancybox not working. why?
- Gallery Image Numbers?
- Upload photos to WordPress via ftp w/ [gallery] shortcode?
- How do I create a gallery page?
- NextGen Gallery Slideshow Positioning Issue
- Install Gallery 3 in Subdirectory of WordPress
- Hide Gallery from the_conent
- Inside text editor my preview gallery images are in full size
- How to run custom JavaScript code on gallery attachment image selection
- How do I export WordPress galleries?
- Lightbox Effect Not Working
- How to use the WP export and get images that are contained in a posts gallery
- How to add a list of all galleries to my sidebar?
- Gallery Shortcode Showing IDs
- Can’t get the columns of galleries when the user set the column number to 3 if there are 2 galleries?
- How to have Tiled Galleries like in WordPress.com?
- Optimizing wp_get_attachment_image_src
- Get gallery images from page ID
- WordPress Gallery Thumbnail images look blurry
- Checking for ‘gallery’ shortcode using strpos always returns false
- How to change gallery grid from 4 columns to 3 columns? [closed]
- Possibilities for customising the standard wordpress gallery?
- Gallery order specified by shortcodes is ignored in gallery function
- How to display some of images from media library?
- How to add a div around the default gallery output
- Get the a specific image from the post gallery linked to post_id
- Workflow for users to download files?
- Gallery – custom html for inserting images
- How do I test whether [gallery] is empty?
- making wordpress gallery responsive
- Images hidden from wordpress gallery
- How to make in wordpress a gallery with 3 colums to 1 on mobile devices responsive?
- Multiple WordPress Standard Galleries on a page stop images being displayed from other page galleries
- How to automatic specify images in content added to gallery
- Getting gallery instead of single attachment
- Is it possible to make a user-specific gallery?
- Easy Image Gallery – Retrieve Serialized Data
- How to create different gallery-types and let the editor choose between them?
- Output all images from gallery inside a slider
- How to have two galleries side by side?
- WordPress Gallery is not displaying
- Error while uploading photos
- How can I bulk import into galleries?
- How do I extract a gallery image from databse?
- Display custom gallery in each wordpress post
- Options for an SEO gallery?
- 3.9 Galleries & Thumbnails
- Add anchor tag on previous_image_link / next_image_link
- gallery image size
- Moved blog – galleries don’t work
- I want to add a gallery to a post but I don’t want it displayed in the content?
- Change the values of numberposts gallery
- Why do all Gallery functions return null for me?
- Displaying only specific galleries using shortcode on a custom page
- Hide the ‘Gallery Settings’ section of the Gallery tab of the media Thickbox
- Hierarchical gallery
- Single Image Gallery Post [closed]
- Gallery image must open up in fancybox directly not post page
- Adding a “More Galleries” Page to the End of an Image.php Gallery
- Multiple Gallery Posts With Sldiers
- Cany anyone name this lightbox? [closed]
- Use bootstrap for wordpress gallery? [closed]
- Click thumbnail, change main image – NextGen or somethign else?
- how to show list image in gallery?
- Convert WordPress default grid to carousel
- how to add this type of gallary photo number counter?