Tagged: alt, description, Lightbox
-
AuthorPosts
-
November 7, 2013 at 4:50 pm #185701
Hello,
I have a problem with the lightbox. If I insert a gallery, everything works fine when clicking on an image. The “alt text” is displayed above the image container and the description shows under the image.
But if I want to enlarge the featured picture of a post, only the “alt text” is shown and the description is missing. There is also an alignment issue with the closing button (see picture).
- This topic was modified 11 years ago by StuWeTueHo.
November 11, 2013 at 9:38 am #186765No answer so far? Maybe this topic was overlooked by the amazing support team – so I try again.
This problem really seems to be a theme related issue, as the screenshots above were taken of the enfold demo site. Thanks!November 12, 2013 at 2:09 pm #187227Hey!
We’ll implement it in the next version – for now open up /wp-content/themes/enfold/includes/loop-index.php and replace
if(strpos($blog_style, 'big') !== false) { if($slider) $slider = '<a href="'.$link.'">'.$slider.'</a>'; if($slider) echo '<div class="big-preview '.$blog_style.'">'.$slider.'</div>'; }
with
if(strpos($blog_style, 'big') !== false) { $description = get_post_field( 'post_content', get_post_thumbnail_id()); $description = trim($description) ? esc_attr($description) : ""; if($slider) $slider = '<a href="'.$link.'" title="'.$description .'">'.$slider.'</a>'; if($slider) echo '<div class="big-preview '.$blog_style.'">'.$slider.'</div>'; }
Regards,
PeterNovember 13, 2013 at 11:27 am #187708Thanks Peter for looking into this topic. Unfortunately this code doesn´t work.
I think there is also a small mistake inside the code …
title="'.description .'"
“$” is mising – but this doesn´t fix the problem.November 13, 2013 at 3:01 pm #187767Hey!
Maybe you use the “small thumbnail” post layout? If yes please delete the entire code in loop-index.php and use: http://pastebin.com/n5m6JZyW (=updated code which will be part of the next theme update). Make sure that you inserted some text into the description field: http://www.clipular.com/c?5000794906558464=KtjSYCDzHo7HRrHafw_p9w0qaD0&f=.png
Regards,
PeterNovember 14, 2013 at 10:11 am #188277Thumbs up for your help. Everything works smoothly now.
November 14, 2013 at 12:07 pm #188313Hi!
Great :)
Regards,
Peter -
AuthorPosts
- The topic ‘Lightbox problem – description / caption not displayed’ is closed to new replies.