Title: Author.php post problem
Last modified: August 19, 2016

---

# Author.php post problem

 *  [lencicki](https://wordpress.org/support/users/lencicki/)
 * (@lencicki)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/authorphp-post-problem/)
 * I’d like to display all posts from a given author on my author post page, however
   at the moment, using the basic code it only lists the most recent ten. I’m not
   sure what code to change to show all –
    I suspect that i also need to figure 
   out how to paginate those results, as some authors have over 100 entries.
 * Any ideas?

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

 *  [MichaelH](https://wordpress.org/support/users/michaelh/)
 * (@michaelh)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/authorphp-post-problem/#post-1231922)
 * In a almost any archive related template, such as an [author template](http://codex.wordpress.org/Author_Templates),
   this just before your [loop](http://codex.wordpress.org/The_Loop) should work:
 *     ```
       <?php
       $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
       query_posts($query_string . '&posts_per_page=7&paged='.$paged);
       ?>
       ```
   
 * The [template tag](http://codex.wordpress.org/Template_Tags), [previous_posts_link()](http://codex.wordpress.org/Template_Tags/previous_posts_link)
   and [next_posts_link()](http://codex.wordpress.org/Template_Tags/next_posts_link),
   present the previous/next links, so look at the WordPress Default theme’s archive.
   php for examples.
 * Also see this plugin:
    [http://wordpress.org/extend/plugins/custom-post-limits/](http://wordpress.org/extend/plugins/custom-post-limits/)
 *  Thread Starter [lencicki](https://wordpress.org/support/users/lencicki/)
 * (@lencicki)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/authorphp-post-problem/#post-1232021)
 * Thanks very much!
    The custom post limits fdid the trick. WHowever I can’t seem
   to get the previious and next code to work. Right now I’ve put it in the loop
   here –
 *     ```
       <?php endwhile; else: ?>
               <p><?php _e('No posts by this author.'); ?></p>
       			<div class="navigation">
       			<p class="prev-post"><?php next_posts_link('&laquo; Older Entries') ?></p>
       			<p class="next-post"><?php previous_posts_link('Newer Entries &raquo;') ?></p>
       		</div>
   
           <?php endif; ?>
       ```
   
 * but it doesn’t appear to display.
    (see here: [http://www.orbitbooks.net/author/alex-lencicki/](http://www.orbitbooks.net/author/alex-lencicki/))
   I’m pretty sure i have it in the wrong place, but can’t seem to suss out where
   it should be.
 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/authorphp-post-problem/#post-1232022)
 * That’s because you’ve plaed it inside the `else` condition, ie. when there are
   no posts.
 * Seperate this bit.
 *     ```
       <?php endwhile; else: ?>
       ```
   
 * ..into..
 *     ```
       <?php endwhile; ?>
       // PLACE CODE HERE
       <?php else: ?>
       ```
   
 * See if that helps… 🙂
 *  Thread Starter [lencicki](https://wordpress.org/support/users/lencicki/)
 * (@lencicki)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/authorphp-post-problem/#post-1232027)
 * That did it! Thanks t31os!

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

The topic ‘Author.php post problem’ is closed to new replies.

## Tags

 * [author pages](https://wordpress.org/support/topic-tag/author-pages/)
 * [pagination](https://wordpress.org/support/topic-tag/pagination/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [lencicki](https://wordpress.org/support/users/lencicki/)
 * Last activity: [16 years, 8 months ago](https://wordpress.org/support/topic/authorphp-post-problem/#post-1232027)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
