Title: empec's Replies | WordPress.org

---

# empec

  [  ](https://wordpress.org/support/users/empec/)

 *   [Profile](https://wordpress.org/support/users/empec/)
 *   [Topics Started](https://wordpress.org/support/users/empec/topics/)
 *   [Replies Created](https://wordpress.org/support/users/empec/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/empec/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/empec/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/empec/engagements/)
 *   [Favorites](https://wordpress.org/support/users/empec/favorites/)

 Search replies:

## Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Show more than one post in home.](https://wordpress.org/support/topic/show-more-than-one-post-in-home/)
 *  Thread Starter [empec](https://wordpress.org/support/users/empec/)
 * (@empec)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/show-more-than-one-post-in-home/#post-7311652)
 * It is funny that when I use the following code, the minimum number of posts in
   the result is 4. Even when the posts_per_page argument is set to 1, 2 or 3. When
   I change it to 5, the result is also 5 posts. The same counts for the above code
   when I remove the ‘break;’.
 *     ```
       $args = array(
       	'posts_per_page' => 5,
       	'category__not_in' => get_cat_ID( 'Featured articles' ));
   
       $the_query = new WP_Query( $args );
   
       while ( $the_query->have_posts() ) : $the_query->the_post();
   
       echo '<li>' . get_the_title() . '</li>';
   
       endwhile;
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Show more than one post in home.](https://wordpress.org/support/topic/show-more-than-one-post-in-home/)
 *  Thread Starter [empec](https://wordpress.org/support/users/empec/)
 * (@empec)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/show-more-than-one-post-in-home/#post-7311632)
 * Sorry, code should be:
 * I’m currently running wordpress 4.5 with a WooTheme called The Morning After.
   I decided to change a few things here and there, but encountered some issues 
   regarding the posts_per_page argument used in the WP_query object. The intention
   is to show more than one post (3 or 4 posts) and ignore the category _Featured
   articles_.
 *     ```
       $args = array('posts_per_page'   => 3,
                     'category__not_in' => get_cat_ID('Featured articles'));
   
       $query = new WP_query($args);
   
       while ( $query->have_posts() ) { $query->the_post();
   
           echo '<li>' . get_the_title() . '</li>';
   
           break;
       }
       wp_reset_postdata();
       ```
   
 * What am I doing wrong? Result is just the latest _non-Featured articles_ post.

Viewing 2 replies - 1 through 2 (of 2 total)