Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • #21106

    Hi Kriesi,

    Is there any way for the No Slideshow option / Display images below each other, to have the image’s caption below each image?

    At the moment if I choose to have no slideshow, e.g. in the portfolio item, it would just display images one after another and missing the caption for each image.

    Will there be a fix for a video caption as well?



    Hi manatama,

    For the video caption question, no there will most likely not ever be an option for captions on video simply because of the possibility of causing conflicts with various video services and it displaying properly.

    If you are choosing the no slideshow option, what its doing is just stripping out all of the slideshow code and displaying the images in a somewhat raw format. It would need to be added in as a new feature to make the captions show up along with that kind of output.




    Hi Devin,

    Thanks for the quick reply and I understand about the Video Caption.

    Is there any quick PHP hack to display each comment of the image array underneath the image?

    This would be a great feature to have for this theme.



    You could try something like this with css . Please add it to /css/custom.css or to quick css.

    #top.single-portfolio .featured:after {

    content: attr(data-caption);

    The thing is, if it has html in there, I don’t think it will execute and instead be just spit out as tags.




    Hi Nick,

    It kinda works and kinda doesn’t.

    It does spit out html tags <div></div>

    You can see the example here:



    Well if you aren’t using the captions anywhere else you can just remove the tags. Please open up /inclues/helper-slideshow.php and find line 220 that looks like the code below

    if(!empty($slide['slideshow_caption'])) $data .= '<div class="featured_caption">'.do_shortcode(nl2br($slide['slideshow_caption'])).'</div>';

    and replace the above line with the two lines below

    if(!empty($slide['slideshow_caption'])) $data .= $slide['slideshow_caption'];
    //if(!empty($slide['slideshow_caption'])) $data .= '<div class="featured_caption">'.do_shortcode(nl2br($slide['slideshow_caption'])).'</div>';


    If you plan on using the captions elsewhere in the regular format, what I would do is prefix only the captions that you want to show without the html tags with something like %$% and then do a if/else check on line 220 for the presence of %$% inside the string to determine whether to remove the html tags (and %$% from the string). Its a bit hacky but will work.




    Thanks for your help Nick, I’ll try it out.




    Hey Dhani,

    Just note Nicks solution will have just about zero compatibility with anything other than the latest versions of browsers so keep that in mind if you do any browser testing :)





    I thought IE8 is ok with this construct…

    content: attr(data-caption);

    I haven’t really looked at other browsers.. Just assumed. hmmm. Thanks for pointing this out Will do some testing…



Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Image caption and video caption.’ is closed to new replies.