• Resolved srbdesign

    (@srbdesign)


    I’m having trouble getting the caption to work the way I wish. At the moment I can only make the Alt text appear as the caption, despite ticking the boxes for using Title, Caption and Description elements in the settings, and filling out those fields for each image.

    I’m using a blocks theme so really uncertain how and where to use the php filter function, to make all this happen.

    Any help would be very grateful – other than this the plugin works brilliantly!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    The Alt text is read directly from the HTML source code. However all other captions need to be read from the WordPress database if they are not present as attributes or figure captions in the HTML source code. To make this work, the image URLs need to be recognized as WordPress media files on your website, so the plugin knows which database entry has to be read. If you use a CDN for your images you may need to set the CDN options of Lightbox with PhotoSwipe accordingly, so the URL will be recognized correctly. See the CDN options in the “General” tab.

    Thread Starter srbdesign

    (@srbdesign)

    Thanks Arno, I’ve managed to overcome my issues by changing the theme template.

    I was still seeing the same issues with the caption and description fields not being loaded, even with the database setting switched on. Once I realised that the data could be pulled from attributes in the HTML it was an easy fix to add those into the code.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Help with caption please’ is closed to new replies.