Support » Plugin: WP Nivo Slider » [Plugin: WP Nivo Slider] Change caption to Post Title

  • Guys,

    WP Nivo Slider display the image title as caption.
    Is there a way of using the post title as caption? I tried to use attributes in the_post_thumbnail(), but it requires me to override the image size and that just broke the plugin.

    The code I tried:

    <?php if(has_post_thumbnail()) : ?>
       <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
    	<?php the_post_thumbnail(array(w,h), array ('title'	=> trim(strip_tags( $attachment->post_title )),); ?>
       </a>
    <?php endif ?>

    Thanks for the help with this awesome plugin!

    http://wordpress.org/extend/plugins/wp-nivo-slider/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think if you go to your jquery.nivo.slider.js to line 107, you can find

    //Create caption
            slider.append(
                $('<div class="nivo-caption"><p></p></div>').css({ display:'none', opacity:settings.captionOpacity })
            );

    There you might want to change the title, I did not test it.

    can you tell me more specific about jquery.nivo.slider.js in line 107
    what kind of code that should place to display the title caption?

    thanx..

    blitz999

    (@blitz999)

    I’m looking to do exactly the same thing. I can’t figure out how the caption works on this to change it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Nivo Slider] Change caption to Post Title’ is closed to new replies.