• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

Center Caption Text Over WordPress Gallery Image

The code in this tutorial enables you to display the image caption for each gallery item over each gallery image.

Here’s the demo tested on the Enterprise Pro child theme by StudioPress:

gallery-captions

Once you’ve created your gallery and added captions to each image in the gallery, you can simply paste the CSS at the end of your child theme’s style.css file.

The CSS includes CSS for Media Queries so the caption always stays centered over the image at every screen width.

You can also link each image in the gallery to any URL.

Note: The gallery used in this tutorial is the WordPress gallery included in the WordPress core. To use this solution with other galleries, you may need to change the classes in the CSS.

Here’s the code for logged in members:

Register for full access

Related Tutorials

  • Responsive Images Inline Full Screen
  • Show Caption Text Over Gallery Images With Hover Effects

WordPress Gallery

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags
 

Loading Comments...
 

You must be logged in to post a comment.