Support » Plugin: PhotoSwipe » Captions in markup… but not in the PhotoSwipe gallery

  • Resolved creight88

    (@creight88)


    Louy, thank you for making a plugin out of PhotoSwipe!

    I can’t seem to get my captions to work. The <div class="pswp__caption__center"></div> is always empty. I tried it with the standard WP gallery as well as the Heroic Galleries plugin. I built my theme on the last version of Roots (roots.io). Is my markup different from what your plugin is expecting?

    Here’s a snippet that I’m working with:

    <div class="gallery gallery-393-2">
      <div class="row gallery-row">
        <div class="col-sm-3 col-lg-3">
          <a class="thumbnail img-thumbnail" data-size="790x592" href='http://dwindustrial.com/wp-content/uploads/Slide17a.jpg'>
            <img width="150" height="150" src="http://dwindustrial.com/wp-content/uploads/Slide17a-150x150.jpg" class="attachment-thumbnail" alt="Blower Package" />
          </a>
          <div class="caption hidden">Blower Package (Caption)</div>
        </div>
        <div class="col-sm-3 col-lg-3">
          <a class="thumbnail img-thumbnail" data-size="762x589" href='http://dwindustrial.com/wp-content/uploads/Slide10A.jpg'>
            <img width="150" height="150" src="http://dwindustrial.com/wp-content/uploads/Slide10A-150x150.jpg" class="attachment-thumbnail" alt="Outside" />
          </a>
          <div class="caption hidden">Outside (Caption)</div>
        </div>
        <div class="col-sm-3 col-lg-3">
          <a class="thumbnail img-thumbnail" data-size="675x590" href='http://dwindustrial.com/wp-content/uploads/Slide10b.jpg'>
            <img width="150" height="150" src="http://dwindustrial.com/wp-content/uploads/Slide10b-150x150.jpg" class="attachment-thumbnail" alt="Inside" />
          </a>
          <div class="caption hidden">Inside (Caption)</div>
        </div>
      </div>
    </div>

    I am using version 4.0.7.4 of your plugin.

    https://wordpress.org/plugins/photo-swipe/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Captions in markup… but not in the PhotoSwipe gallery’ is closed to new replies.