• 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!

      https://ww.wp.xz.cn/plugins/easy-image-gallery/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Arnold!

    I’m not entirely sure I understand what you’re after. It seems the code you pasted has broken the layout of this page. Is it something custom that the plugin does not provide? If so you’ll need custom development. I’d recommend you hire a developer to help you out with these modifications.

    Thread Starter arnoldpiscel

    (@arnoldpiscel)

    I don’t need a developer for this , I think it i easy.. I just need to call this captions from anyfile.php and not only from functions.php . Is it possible with this plugin?^^Thanks

    You can place code anywhere you like, as long as it’s loaded into your plugin or theme.

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

The topic ‘Call captions in template.php file’ is closed to new replies.