Adding Captions to a Dynamic Featured Slider
-
Hello,
I’m using the code below to show the featued image & the dynamic featured image in a slider on my homepage & post pages.
<?php if( class_exists('Dynamic_Featured_Image') ) { global $dynamic_featured_image; $featuredImages = $dynamic_featured_image->get_featured_images( $postId ); if( !is_null($featuredImages) ){ echo "<div class='entry-thumbnail nivoSlider'>"; if (has_post_thumbnail( $post_id ) ){?> <a href="<?php get_permalink(); ?>" class="thickbox"><img alt="thumb image" class="wp-post-image" src="<?php $image_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src($image_id,'header_news_thumb', true); echo $image_url[0]; ?>"></a> <?php } foreach($featuredImages as $images) { echo "<a href='" . get_permalink() . "' title = '" . $dynamic_featured_image->get_image_alt_by_id($images['attachment_id']) . "' class='thickbox'>"; echo "<img src='" . $images['full'] . "' />"; echo "</a>"; } echo "</div>"; } } ?>
Is there a way to add captions with the images to the code. No matter what I try it does the first image, but not the rest. It also then screws with the image sizes after that.
Any help would be great.
Thanks
Wayne
- The topic ‘Adding Captions to a Dynamic Featured Slider’ is closed to new replies.