Title: Image Title or Description
Last modified: August 21, 2016

---

# Image Title or Description

 *  Resolved [webworks](https://wordpress.org/support/users/webworks/)
 * (@webworks)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/image-title-or-description/)
 * I added the code to the functions.php file, but it doesn’t seem to be picking
   up the description.
 * Is there any other way I can get some kind of title to display for each photo?
 * [http://highlandplantationapartmentsbatonrouge.com/contact-us/photo-gallery/](http://highlandplantationapartmentsbatonrouge.com/contact-us/photo-gallery/)
 * Thank you in advance for your response!
    Heather
 *     ```
       /**
        * Filter Easy Image Gallery HTML to add description
        *
       */
   
       function my_child_theme_easy_image_gallery_description( $html, $rel, $image_link, $image_class, $image_caption, $image, $attachment_id, $post_id ) {
   
       	// get the image's description
       	$image_description = get_post( $attachment_id )->post_content ? get_post( $attachment_id )->post_content : '';
   
       	// add the description to the title attribute
       	if ( function_exists( 'easy_image_gallery_has_linked_images' ) && easy_image_gallery_has_linked_images() )
       		$html = sprintf( '<li><a %s href="%s" class="%s" title="%s - %s"><i class="icon-view"></i><span class="overlay"></span>%s</a></li>', $rel, $image_link, $image_class, $image_caption, $image_description, $image );
       	else
       		$html = sprintf( '<li>%s</li>', $image );
   
       	return $html;
       }
       add_filter( 'easy_image_gallery_html', 'my_child_theme_easy_image_gallery_description', 10, 8 );
       ```
   
 * [https://wordpress.org/plugins/easy-image-gallery/](https://wordpress.org/plugins/easy-image-gallery/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Andrew Munro / AffiliateWP](https://wordpress.org/support/users/sumobi/)
 * (@sumobi)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/image-title-or-description/#post-4637808)
 * Looks like you have a Javascript error on your page for starters that’s causing
   the images to not open in a lightbox.
 * The code works for me, are you sure you added a description to the image?
 * [[
 * [[
 *  Thread Starter [webworks](https://wordpress.org/support/users/webworks/)
 * (@webworks)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/image-title-or-description/#post-4637834)
 * That is so very strange, because the light box was just displaying for me only
   a day ago (no new plugins since), and now it’s not loading.
    [http://highlandplantationapartmentsbatonrouge.com/wp-content/uploads/lightbox.png](http://highlandplantationapartmentsbatonrouge.com/wp-content/uploads/lightbox.png)
 * On your sample links, you must be using a different light box. Which one are 
   you using?
 * You wouldn’t happen to be able to identify the plugin which might be causing 
   the javascript error, would you? I don’t see any errors on my end here. I’d love
   to be able to get to the bottom of it.
 * Thanks so much for your response,
 *  Thread Starter [webworks](https://wordpress.org/support/users/webworks/)
 * (@webworks)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/image-title-or-description/#post-4637837)
 * I changed lightboxes and it’s now working for me 🙂
 * I wish I knew more about that error – I ran it through a third-party test, and
   it came up with one error “http” with no other details. If you do happen to remember
   anything else about it, I appreciate it.
 * Otherwise, thank you for a super plugin!
 *  [Andrew Munro / AffiliateWP](https://wordpress.org/support/users/sumobi/)
 * (@sumobi)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/image-title-or-description/#post-4637852)
 * You have something on the page called “Shareaholic” which is causing the following
   JS error:
 * TypeError: Shareaholic.Utils is undefined
 * This is breaking the lightbox on:
    [http://highlandplantationapartmentsbatonrouge.com/contact-us/photo-gallery/](http://highlandplantationapartmentsbatonrouge.com/contact-us/photo-gallery/)
 *  [Andrew Munro / AffiliateWP](https://wordpress.org/support/users/sumobi/)
 * (@sumobi)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/image-title-or-description/#post-4637974)
 * Closing due to inactivity

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Image Title or Description’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/easy-image-gallery_9da6b0.svg)
 * [Easy Image Gallery](https://wordpress.org/plugins/easy-image-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-image-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-image-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-image-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-image-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-image-gallery/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Andrew Munro / AffiliateWP](https://wordpress.org/support/users/sumobi/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/image-title-or-description/#post-4637974)
 * Status: resolved