Tag Archives: featured image

multiple featured images – plugin

Use this plugin for multiple featured images

https://wordpress.org/plugins/dynamic-featured-image/

Display multiple images.

<div id="owl-demo" class="owl-carousel owl-theme">
  <?php
		if( class_exists('Dynamic_Featured_Image') ) {
			 global $dynamic_featured_image;
			 $featured_images = $dynamic_featured_image->get_featured_images( get_the_ID() );
		
			 foreach( $featured_images as $image ) {
					echo "<img src='{$image['full']}'/>";  
				  }
			 if(empty($featured_images)){
					the_post_thumbnail( 'full', array( 'alt' => get_the_title(), 'class' => 'img-responsive') );
				 }	  
		}
?>
</div>

If you want to add slider just add loop in slider structure (You can uuse corosal slider).

Advertisements
%d bloggers like this: