Docs    Facebook    Customizations

Add captions text to Photos grid layout

To add caption text below each photo in your Photos grid feed, add the following JavaScript to your site. This can be done manually using a custom JavaScript plugin. For further information see our documentation here.

setTimeout(function(){
$('.cff-album-item').each(function(){
$self = $(this);
$self.append( '<p style="padding:5px;height:100px;overflow:hidden;">' + $self.find('.cff-lightbox-link').attr('data-title').substring(0,100) + '</p>' );
});
}, 50);

You can adjust the 100 value to show more or fewer characters from your caption.

To add captions when hovering over the photos instead, simply use the following snippet:

setTimeout(function(){
$('.cff-album-item').each(function(){
  $self = $(this);
  $self.find('.cff-photo-hover').append( '<p style="padding:5px;height:100px;overflow:hidden;color:#fff;">' + $self.find('.cff-lightbox-link').attr('data-title').substring(0,500) + '</p>' );
});
}, 50);
support

Couldn’t find your answer in the docs?

Contact Support

Was this article helpful?