Hello @cosiek
Thank you for contacting us,
1. I would like to introduce this style of the gallery in AMP – <amp-inline-gallery> (https://amp.dev/documentation/components/amp-inline-gallery/). How to do that, from a practical sense? In which place input script and where add CSS.
You don’t need to add scripts and CSS ( CSS unless customization is required ) when using AMP components such as <amp-inline-gallery>, The AMP plugin will detect the usage of components on an AMP page and add the necessary scripts and base CSS files that are required for it.
2. How can I enable captions, alt or titles to appear for any such image in the gallery? I would like the reader to know what he sees.
I will recommend using <figure> tag with <figcaption> Learn more here
Just for more information, You can always use the default Gallery Block to create AMP carousel, You can also use the gallery shortcode
eg: [gallery ids="1,2,3,4,5" amp-carousel="true" amp-lightbox=true]
The default gallery carousel will populate with a caption when added if it’s present on the image.
Thread Starter
cosiek
(@cosiek)
Thank you for your comprehensive reply.
Then, if possible, would like to remain with default gallery. Currently, it is:
[gallery size="full" link="file" ids="93880,93868,93866,93884,93898,93896"]
I cannot find the tag that would cause population of caption of image in AMP version of post. Currently, it is still like here: https://ibb.co/GkY98kb
Appreciate your help.
Thank you.
Jakub
-
This reply was modified 3 years, 10 months ago by
cosiek.
Hello @cosiek
As I mentioned before you need to add a caption to the image
Goto-> Dashboard->Media->Libarary->Choose Image you want to add caption -> Click Edit/ Click on Image to edit it-> Look for Caption field and add caption to it.
Screenshot 1
Screenshot 2
Also, edit the gallery shortcode as follows :
[gallery size="full" link="file" ids="93880,93868,93866,93884,93898,93896" amp-lightbox="true" amp-carousel="true"]
Thread Starter
cosiek
(@cosiek)
Thank you.
Captions are added already in all images across website. In the classic view (for Desktop) those are seen in gallery: https://ibb.co/0DhCcJp
In AMP version those are not appearing, despite suggested by you version of shortcode: https://ibb.co/2dTp13T
– classic: https://imperiumromanum.pl/ciekawostka/wrak-punickiego-statku-wojennego-z-marsali/
– mobile AMP: https://imperiumromanum.pl/ciekawostka/wrak-punickiego-statku-wojennego-z-marsali/amp/
Do you know what maybe the issue still?
Regards,
Jakub
@cosiek
If your theme or another plugin is affecting the container tags, can you please send your AMP support UUID by visiting AMP->Support so we can check your site data and provide you with a better solution?
@cosiek As we didn’t receive a response I’ll mark this as resolved. Feel free to open a new support topic if you require any further assistance.