You can use this snippet to add dates below the posts in your Photo, Album, and Video grid feeds.
Photo Feeds
Add the following JavaScript to your site. This can be done manually using a custom JavaScript plugin. For further information see our documentation here.
function cffTimeConverter(UNIX_timestamp){
var a = new Date(UNIX_timestamp * 1000);
var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
var year = a.getFullYear();
var month = months[a.getMonth()];
var date = a.getDate();
var time = date + ' ' + month + ', ' + year;
return time;
}
$('.cff-album-item').each(function(){
var timeStamp = $(this).attr('data-cff-timestamp');
if( $(this).find('.cff-photo-date').length < 1 ) $(this).append( '<p class="cff-photo-date">' + cffTimeConverter(timeStamp) + '</p>' );
});
Album and Video Feeds
Use the following snippet instead to add dates to Album or Video feeds:
function cffTimeConverter(UNIX_timestamp){
var a = new Date(UNIX_timestamp * 1000);
var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
var year = a.getFullYear();
var month = months[a.getMonth()];
var date = a.getDate();
var time = date + ' ' + month + ', ' + year;
return time;
}
$('.cff-album-item').each(function(){
var timeStamp = $(this).attr('data-cff-timestamp');
if( $(this).find('.cff-photo-date').length < 1 ) $(this).find('.cff-album-info').append( '<p class="cff-photo-date">' + cffTimeConverter(timeStamp) + '</p>' );
});