Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for image captions #2

Open
hugobaeta opened this issue Jun 8, 2017 · 3 comments
Open

Add support for image captions #2

hugobaeta opened this issue Jun 8, 2017 · 3 comments

Comments

@hugobaeta
Copy link
Collaborator

No description provided.

@zedejose
Copy link
Owner

zedejose commented Jun 8, 2017

Where in the markup do they go, though?

@hugobaeta
Copy link
Collaborator Author

That is a good question... By default WordPress adds a <figure> around the image, with the caption in <figcaption>, like so:

<div id="gallery-1" class="gallery galleryid-8 gallery-columns-1 gallery-size-full-width">
  <figure class="gallery-item">
    <div class="gallery-icon landscape">
      <img . . .>
    </div>
    <figcaption class="wp-caption-text gallery-caption" id="gallery-1-1847">Coworkers having coffee</figcaption>
  </figure>
  . . .

(no idea what that .gallery-icon.landscape is all about)

I'm not sure how flickity would behave withfigure being used as a .caroucel-cell wrapper instead of div...

@zedejose
Copy link
Owner

zedejose commented Jun 9, 2017

Only option seems to be (clunky) Javascript:

https://codepen.io/desandro/pen/dPdVNM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants