i am working on a wordpress theme and i want to get the slider thumbnail from second featured image and for that purpose i used a "multiple featured image" plugin but i am unable to get it. infact want to get that second featured image only not the first one. i used it on page not on post.
here is the code for plugin registration
if( class_exists( 'kdMultipleFeaturedImages' ) ) {
$args = array(
'id' => 'featured-image-2',
'post_type' => 'page', // Set this to post or page
'labels' => array(
'name' => 'Featured image 2',
'set' => 'Set featured image 2',
'remove' => 'Remove featured image 2',
'use' => 'Use as featured image 2',
)
);
new kdMultipleFeaturedImages( $args );
}
this is the code where it shows default thumbnail and i want to replace it with my 2nd featured image.
<ul>
<?php for ($i = 0; $i < $featured_num; $i++) { ?>
<li> <a href="#"<?php if ( $i == 0 ) echo ' class="active"'; ?>>
<?php print_thumbnail( array(
'thumbnail' => $arr[$i]["thumbnail"]["thumb"],
'use_timthumb' => $arr[$i]["thumbnail"]["use_timthumb"],
'alttext' => $arr[$i]["titletext"],
'width' => (int) $small_width,
'height' => (int) $small_height,
'et_post_id' => $arr[$i]['post_id'],
'title' => $titletext,
) );
?>
<span class="overlay"></span>
</a>
</li>
<?php } ?>
</ul>
and here is the code that i want to work for me but dont know where i amdoing wrong.
<?php
if( class_exists( 'kdMultipleFeaturedImages' ) ) {
kd_mfi_the_featured_image( 'featured-image-2', 'page' );
} ?>
i tried my best to explain my problem so if you guys need extra info that i missed then let me know.