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

Tagged:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: