jespersandell
Member
Posted 3 months ago #
Hi,
Thank you for a great plugin.
If you have more than one image in the post, is there any way you can tell the slider
what image to use? I've tried with the featured image, but it didn't work. The slider automatically uses the last image in the post.
Thanks
Jesper
http://wordpress.org/extend/plugins/carousel-horizontal-posts-content-slider/
subhansanjaya
Member
Plugin Author
Posted 3 months ago #
Please, use this code in carousel-horizontal-posts-content-sldier.php file line #44- 53. This will only select featured post image.
$post_link = get_permalink($post->ID);
if($displayimage=="YES"){
if (has_post_thumbnail( $post->ID ) ):
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
endif;
$featured_img = "<img width='115' height='115' src='". $image[0] . "' " . $attributes . " />";
$slider_gallery.= '<a href="'.$post_link.'">'.$featured_img.'</a>';
}
I hope this will help you.
Thanks.