title: Display only author posts in author page in Wordpress
body: <p>What should I do to display only a certain author posts, in my author.php page? I don't mean an specific author (using author ID), but the default page for authors. With the current code, its displaying posts from all the other authors. Should I use a specific query?</p>
  
  <pre><code>&lt;?php   $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
      $custom_args = array(
      'post_type' =&gt; 'post',
      // 'order' =&gt; 'DESC',
      'posts_per_page' =&gt; 10,
          'paged' =&gt; $paged
      );
  
  // custom query
  $recent_posts = new WP_Query($custom_args);
  
  // check that we have results
  if($recent_posts-&gt;have_posts()) : ?&gt;
  
  &lt;ul class="article_list"&gt;
  
      &lt;?php
      // start loop
      while ($recent_posts-&gt;have_posts() ) : $recent_posts-&gt;the_post(); ?&gt;
  
      &lt;li class="regular"&gt;
          &lt;a href="&lt;?php echo get_permalink(); ?&gt;"&gt;
              &lt;div class="text"&gt;
                  &lt;p class="category"&gt;&lt;?php foreach((get_the_category()) as $category) { echo $category-&gt;cat_name . ' '; } ?&gt;&lt;/p&gt;
                  &lt;p class="autor"&gt;&lt;?php the_author(); ?&gt;&lt;/p&gt;
                  &lt;h3 class="article_title"&gt;&lt;?php echo mb_strimwidth(get_the_title(), 0, 80, '...'); ?&gt;&lt;/h3&gt;
                  &lt;p class="date"&gt;&lt;?php echo get_the_date( 'Y-m-d' ); ?&gt;&lt;/p&gt;
              &lt;/div&gt;
              &lt;div class="mask"&gt;
                &lt;?php
                $url = wp_get_attachment_url( get_post_thumbnail_id($post-&gt;ID) );
                echo '&lt;div class="art_img" style="background: url('. $url.')"&gt;&lt;/div&gt;';
                ?&gt;
              &lt;/div&gt;
          &lt;/a&gt;
      &lt;/li&gt;
  &lt;?php endwhile; ?&gt;
  &lt;/ul&gt;
  &lt;?php endif;
  echo '&lt;div class="pagination"&gt;';
  if(function_exists('wp_pagenavi')) { wp_pagenavi(array( 'query' =&gt; $recent_posts )); }
  echo '&lt;/div&gt;';
  wp_reset_postdata();
  ?&gt;
  </code></pre>