Title: Featured Posts
Last modified: August 30, 2016

---

# Featured Posts

 *  [McCage](https://wordpress.org/support/users/mccage/)
 * (@mccage)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/featured-posts-23/)
 * In the Home.php of the Magazine theme is code to maybe display a carousel of 
   featured posts: just what I am looking for! How can we activate this function?
   I don’t see how!
    Here is the code I found:
 *     ```
       if(!is_paged()) :
       			$featured_posts = magazine_get_featured_posts();
       			if ( $featured_posts->have_posts() ) :
       				echo '<div id="carousel-example-generic" class="carousel slide entry">';
       				$indicator ='<!-- Indicators -->
       					  <ol class="carousel-indicators">';
       				$slide = '<!-- Wrapper for slides -->
       							  <div class="carousel-inner">';
       				$counter = 0;
       				while ( $featured_posts->have_posts() ) {
       				    $featured_posts->the_post();
   
       				    $indicator .='<li data-target="#carousel-example-generic" data-slide-to="'.$counter.'" class="'. ($counter == 0 ? 'active' : '') .'"></li>';
       					$slide .='<div class="item '. ($counter == 0 ? 'active' : '') . '">
       							      '. get_the_post_thumbnail( get_the_id(), 'sticky' ) .'
       							      <div class="carousel-caption transparent">
       							        <h4 class="notransparent"><a class="notransparent" href="'.get_permalink().'">'. get_the_title() .'</a></h4>
       							      </div>
       							    </div>';
   
       				    $counter++;
       				}
   
       				//echo $indicator.'</ol>';
       				echo $slide.'</div>';
       				echo '<!-- Controls -->
       					  <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
       					    <span class="icon-prev"></span>
       					  </a>
       					  <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
       					    <span class="icon-next"></span>
       					  </a>';
       				echo '</div>';
   
       			endif;
       ```
   

The topic ‘Featured Posts’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/magazine/0.3.3/screenshot.png)
 * Magazine
 * [Support Threads](https://wordpress.org/support/theme/magazine/)
 * [Active Topics](https://wordpress.org/support/theme/magazine/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/magazine/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/magazine/reviews/)

## Tags

 * [featured](https://wordpress.org/support/topic-tag/featured/)
 * [home](https://wordpress.org/support/topic-tag/home/)

 * 0 replies
 * 1 participant
 * Last reply from: [McCage](https://wordpress.org/support/users/mccage/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/featured-posts-23/)
 * Status: not resolved