title: How to loop posts from a specific category in WordPress homepage
body: <p>If I want to loop 3 posts from a specific category in index.php of WordPress than what I've to do?</p>
  
  <pre><code>&lt;?php if ( have_posts() ) : ?&gt;
  
  &lt;?php /* Start the Loop */ ?&gt;
  &lt;?php while ( have_posts() ) : the_post(); ?&gt;
  
  &lt;?php
  get_template_part( 'content', get_post_format() );
  ?&gt;
  
  &lt;?php endwhile; ?&gt;
  
  &lt;?php the_posts_navigation(); ?&gt;
  
  &lt;?php else : ?&gt;
  
  &lt;?php get_template_part( 'content', 'none' ); ?&gt;
  
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>I want to loop 3 post from a category before <code>&lt;?php get_template_part( 'content', 'none' ); ?&gt;</code></p>