Call captions in template.php file
-
Hey guys. First of all THANKS FOR GREAT PLUGIN! I want to know how to call captions in my template.php file.
I have this
function sumobi_eig_get_caption( $image_caption ) {
return ‘<span class=”caption”>’ . $image_caption . ‘</span>’;
}function sumobi_eig_add_caption( $html, $rel, $image_link, $image_class, $image_caption, $image, $attachment_id, $post_id ) {
// add caption for linked images
if ( easy_image_gallery_has_linked_images() ) {
$html = sprintf( ‘- <i class=”icon-view”></i><span class=”overlay”></span>%s%s
‘, $rel, $image_link, $image_class, $image_caption, $image, sumobi_eig_get_caption( $image_caption ) );
}
// add caption for non-linked images
else {
$html = sprintf( ‘<li class=”fade” data-url-id=”%s”>%s%s’,$attachment_id, $rel, $image_link, $image_class, $image_caption, $image, sumobi_eig_get_caption( $image_caption ) );
}
return $html;
}
add_filter( ‘easy_image_gallery_html’, ‘sumobi_eig_add_caption’, 10, 8 );But i want tag for my gallery template^^ THANKS!
The topic ‘Call captions in template.php file’ is closed to new replies.