• Resolved webworks

    (@webworks)


    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?

    https://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://www.ads-software.com/plugins/easy-image-gallery/

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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

    (@webworks)

    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.
    https://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

    (@webworks)

    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!

    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:
    https://highlandplantationapartmentsbatonrouge.com/contact-us/photo-gallery/

    Closing due to inactivity

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Image Title or Description’ is closed to new replies.