What can we help you with?
Home › Forums › Themes Support › How to show Image Title (information) in WordPress
Response time up to 1 business day.
Tagged: image meta
This topic contains 0 replies, has 1 voice, and was last updated by admin 2 weeks, 4 days ago.
Hi All Customer,
In this topic tutorial we’ll help you show title or other information of an Image in WordPress.
In this example we’ll show image title of our Haru Images Gallery shortcode (similar you can show with other image)
Step 1: To customize any template of theme or our plugin you should know about use child theme to customize here:
How to customize WordPress theme using Child theme
Step 2: You need edit image and set information like this:
Step 3: Find the template you need to customize. In this example it is: wp-content/plugins/templates/images-gallery/ then open file slick.php as example.
Use this code to display title or caption of image:
<h6><?php echo wp_get_attachment_caption($image['image']); ?></h6>
<h6><?php echo get_the_title($image['image']); ?></h6>
Here is the result at frontend:
Hope this help!
P/s: Here is reference link: http://thiagodiezel.com/sowp/function-to-get-an-attachments-caption-title-alt-description
You must be logged in to reply to this topic.