Title: Author Template pagination problem&#8230;.
Last modified: August 19, 2016

---

# Author Template pagination problem….

 *  [harjeet singh](https://wordpress.org/support/users/harjeet-singh/)
 * (@harjeet-singh)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/author-template-pagination-problem/)
 * I am just trying to customize the author template into different section, Example:-
   we have two columns. In column 1 we want to show posts from cat=1 and in column
   2 we want to show posts from cat=3. I have achieved the display for cat=1 and
   cat=3 but the it shows all the posts from that category . The problem arrives
   if i limit the posts to certain no. , then the pagination shows links as per 
   the total post count by the author.
    Example:- m having 20 posts in cat=1 and
   30 in cat=3 and if i limit showposts to 5 for cat=1 it creates pagination link
   calculating the total posts from the author i.e for 50 posts. The links for cat
   =1 works and the remaining is left blank. **Hope i have cleared my problem** 
   here is my code…
 * >  <?php if (have_posts()) : ?>
   >  <?php $paged = (get_query_var(‘paged’)) ? get_query_var(‘
   > paged’) : 1; $my_query = new WP_Query(“cat=5,6&showposts=4&paged=$paged”); ?
   > > <?php while ($my_query->have_posts()) : $my_query->the_post(); ?> <div class
   > =”post_excerpt”>
   >  <?php the_excerpt(); ?>
   >  </div>
   >  <?php endwhile; ?>
   >  <?php else: echo “No Post”; ?><?php endif; ?>
   >  <div class=”navigation”>
   >  <div class=”alignleft”><?php next_posts_link(‘« 
   > Older Entries’) ?></div> <div class=”alignright”><?php previous_posts_link(‘
   > Newer Entries »’) ?></div> </div>

The topic ‘Author Template pagination problem….’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [harjeet singh](https://wordpress.org/support/users/harjeet-singh/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/author-template-pagination-problem/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
