• Hello,

    Fantastic plugin — I’ve been using versions of this for years. The only one I found to display thumbnail nav & captions alongside a primary image.

    However, using the latest version of plugin & WordPress, the captions don’t appear. A url is here: https://apollinaire.annalaurent.com/index.php/anna-laurent/ where I’ve used shortcode [portfolio_slideshow showcaps=true navpos=disabled] and also selected “show captions” on the settings page.

    I desperately need to figure this out! I’ve tested different plugins & none seem to function as well as this one theoretically does.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi,
    Yes a great plugin and has worked well until upgraded, now I have the same problem, captions are not showing and new images added to the slideshow do not show on the public side although are showing in admin for the post.
    Would really appreciate some help, thank you.

    Was there ever a suggested fix for this issue?

    Thanks

    I got around this by rolling back plug-ins one by one. The captions re-appeared when the interfering plug-in was found. Cannot remember which one it was though. I have 9 updates I could initiate but won’t be doing any in case the problem returns.

    > rolling back plug-ins one by one

    as in deactivating all your plugins one by one?
    Or installing an older versions of Portfolio Slideshow?
    Or installing older versions of your other plugins?

    Thanks

    If you can remember which plugins you updated before the problem started this will narrow it down. Click on Rollback for a plug-in and it will show versions you can rollback to. It is hit or miss but it worked for me once the offending plug-in was found. I would try Portfolio Slideshow first. Let me know if it works.

    Not an option to roll back updates.

    So I found the two bugs in the php and the javascript.

    In wordpress 4.6 and above to get the caption of attachments you need to use wp_get_attachment_caption.

    For the javascript bug I checked the old version on how to show the caption but didn’t find it so I implemented my own workaround.

    In portfolio-slideshow/src/resources/public.js function cyclePager() I added this:

    $($(‘.slideshow-caption’)[0]).show();

    at the end of the function. And in function onAfter I added this:

    $(‘.slideshow-caption’).hide(); $($(‘.slideshow-caption’)[opts.currSlide]).show();

    at the beginning of the function.

    On the php side I modified the portfolio-slideshow/src/views/meta.php,
    changing this block of code
    <?php if ( ‘true’ == $showcaps ) : ?>
    <p class=”slideshow-caption”>
    <?php echo sanitize_text_field( get_post_meta( $slide[‘image’], ‘_TODO_caption’, true ) ); ?>
    </p>
    <?php endif; ?>

    to this

    <?php if ( ‘true’ == $showcaps ) : ?>
    <p class=”slideshow-caption” style=”display:none; text-align:left”>
    <?php echo sanitize_text_field( wp_get_attachment_caption( $slide[‘image’], ‘_TODO_caption’, true ) ); ?>
    </p>
    <?php endif; ?>

    From the wp-admin side, to display the caption you just need to add the showcaps=true in the shortcode.
    Ex. [portfolio_slideshow id=15 showcaps=true]

    Hope this helps.

    robstapl

    (@robstapl)

    @webwerk
    Hello
    I implemented your solution (v. 1.12.0) and the slideshow stopped working ie autoplay stopped, clicking did nothing.

    Could you post the modified pieces of the code? Maybe I put this in wrong space or something.
    Thank you!

    webwerk

    (@webwerk)

    @robstapl
    As stated in original post:

    In portfolio-slideshow/src/resources/public.js function cyclePager() , add this at the end of the function:

    $($(‘.slideshow-caption’)[0]).show();

    And in function onAfter, add this at the beginning of the function.:

    $(‘.slideshow-caption’).hide(); $($(‘.slideshow-caption’)[opts.currSlide]).show();

    In portfolio-slideshow/src/views/meta.php,
    changing this block of code

    <?php if ( ‘true’ == $showcaps ) : ?>
    <p class=”slideshow-caption”>
    <?php echo sanitize_text_field( get_post_meta( $slide[‘image’], ‘_TODO_caption’, true ) ); ?>
    </p>
    <?php endif; ?>

    to this

    <?php if ( ‘true’ == $showcaps ) : ?>
    <p class=”slideshow-caption” style=”display:none; text-align:left”>
    <?php echo sanitize_text_field( wp_get_attachment_caption( $slide[‘image’], ‘_TODO_caption’, true ) ); ?>
    </p>
    <?php endif; ?>

    From the wp-admin side, to display the caption you need to add the showcaps=true in the shortcode.
    Ex. [portfolio_slideshow id=15 showcaps=true]

    These steps solved the issue for me, not once but on several sites.
    Now it is always possible that you can encounter conflicts with other active plugins on your site. In that case, deactivate all your plugins, then activate them one at a time to find the conflict.

    Good luck!

    robstapl

    (@robstapl)

    @webwerk
    Thanks a lot for your reply.
    Last request, sorry to be a pain ??
    Could you take a look at the code below and let me know I implemented your “hack” correctly?

    function cyclePager() {
    					slideshow.cycle({
    						fx:                 portfolio_slideshow.slideshows[num].trans,
    						speed:              portfolio_slideshow.slideshows[num].speed,
    						timeout:            portfolio_slideshow.slideshows[num].timeout,
    						nowrap:             portfolio_slideshow.slideshows[num].nowrap,
    						next:               '#slideshow-wrapper' + num + ' a.slideshow-next, #slideshow-wrapper' + num + ' #psnext' + num,
    						startingSlide:      index,
    						prev:               '#slideshow-wrapper' + num + ' a.slideshow-prev , #slideshow-wrapper' + num + ' #psprev' + num,
    						before:             onBefore,
    						after:              onAfter,
    						end:                onEnd,
    						slideExpr:          '.slideshow-content',
    						manualTrump:        true,
    						slideResize:        false,
    						containerResize:    false,
    						pager:              '#pager' + num,
    						cleartypeNoBg:      true,
    						pagerAnchorBuilder: buildAnchors
    						$($('.slideshow-caption')[0]).show();
    					});
    				} 

    and this function

    function onAfter(curr,next,opts) {
    					$('.slideshow-caption').hide();
    					$($('.slideshow-caption')[opts.currSlide]).show();
    					var slide = $(this);
    					currSlide[num] = opts.currSlide;		
    					var $h,$w;
    					$h = slide.height(); //slideshow content height
    					$w = slide.width(); //slideshow content height
    														
    					if ( ie === true ) {
    						slideshow.height($h).width($w);
    					} 

    Thank you!

    webwerk

    (@webwerk)

    @robstapl
    Right off, it all looks fine.
    Is there a URL where the slideshow is showing?

    robstapl

    (@robstapl)

    @webwerk
    Actually there is. Here’s a sample post with a slideshow.
    https://fashionpulsedaily.com/trend-circle-bags/

    However, I’v decided to go back to v. 1.5.1 as I couldn’t get your hack working ??
    It runs smoothly, as you can see, on WP4.9.

    IMHO version 1.9.9 onwards are not finished. I tried it on WP 4.6 which was supposedly tested and no luck. Guys tried to rewrite the original plugin however it got stuck me thinks. Pity but what can we do.

    You need to do a clean install of 1.5.1 and it will work seamlessly with all settings configurable.
    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Captions not appearing’ is closed to new replies.