0

I am using Jevelin theme and their Lightbox should showing image caption from alt attribute. Hovewer it doesn't works.

Here is the link: https://www.coleopterafarm.cz/galerie-zlatohlavci/

I am wondering around forums and tips but still without a success.

Could anyone help me with this please? Thank you! :)

  • Hi @Jaccob I've visited your site and clicked on images -> popup appeared and image loaded. It just needs some tome for image to be loaded. – Mikhail Dec 24 '19 at 21:44
  • I have checked website and I have found one think, below js file is not found in js folder coleopterafarm.cz/wp-content/themes/jevelin-child/js/… so please check it. it may help you to fix this issue. – Tanmay Patel Dec 25 '19 at 3:47
  • @Mikhail Yes, photos are loading. There is no problem. JS was fixed Tanmay but it's just a child file without content. I am wondering how to get title or caption of images to show in that lightbox. – Jaccob Dec 25 '19 at 9:59
0

Now I finded this in plugins.js

title:null

I tried to change that to title:'_wp_attachment_image_alt' but it just showed text "_wp_attachment_image_alt"

|improve this answer|||||
0

Your PHP generates this html for gallery grid item:

<div class="sh-image-gallery-item">
  <div class="sh-gallery-item">
    <div class="post-meta-thumb">

      <img src="https://www.coleopterafarm.cz/wp-content/uploads/2019/12/PICT9418-660x660.jpg" alt="Carabus (Coptolabrus) smaragdinus brannicki">

      <a class="sh-overlay-style2" href="https://www.coleopterafarm.cz/wp-content/uploads/2019/12/PICT9418-1024x768.jpg" data-rel="lightcase:imgCollectionsh-image-gallery-simple-Bi7XU3vsdZ">
        <div class="sh-overlay-item">
           <div class="sh-overlay-item-open"></div>
        </div>
      </a>

    </div>
  </div>
</div>

The problem is JS script a part of bundled js file https://www.coleopterafarm.cz/wp-content/themes/jevelin/js/plugins.js expects title="your title for image" attribute for <a class="sh-overlay-style2">

So proper HTML would be

<div class="sh-image-gallery-item">
  <div class="sh-gallery-item">
    <div class="post-meta-thumb">

      <img src="https://www.coleopterafarm.cz/wp-content/uploads/2019/12/PICT9418-660x660.jpg" alt="Carabus (Coptolabrus) smaragdinus brannicki">

      <a class="sh-overlay-style2" title="Carabus (Coptolabrus) smaragdinus brannicki" href="https://www.coleopterafarm.cz/wp-content/uploads/2019/12/PICT9418-1024x768.jpg" data-rel="lightcase:imgCollectionsh-image-gallery-simple-Bi7XU3vsdZ">
        <div class="sh-overlay-item">
           <div class="sh-overlay-item-open"></div>
        </div>
      </a>

    </div>
  </div>
</div>

This way JS will use title from clicked item and display it as it should. Also it's more a question to support of Jevelin theme devs https://themeforest.net/item/jevelin-multipurpose-premium-responsive-wordpress-theme/14728833/support Probably they've fixed it in next theme's update. Or you'll have to alter PHP yourself.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.