• Hello,

    I followed the codex instructions for creating author pages (author.php) on my multi-author blog, which also list posts contributed by each author:
    https://codex.www.ads-software.com/Author_Templates

    However, the author pages will only display the number of posts that my Reading Settings specify as the number of posts for blog pages to show. For instance, I have authored 8 posts, my Reading Settings are set to display 5 posts, so my author page only displays the last 5 posts I have contributed — not my total number of posts.

    Using the $curauth method specified in the codex example above, how can I show more posts on my author pages?

    I’ve included my code below:

    <?php get_header(); ?>
       <div id="content" class="narrowcolumn">
          <!-- This sets the $curauth variable -->
    <?php
    if(isset($_GET['author_name'])) :
    $curauth = get_userdatabylogin($author_name);
    else :
    $curauth = get_userdata(intval($author));
    endif;
    ?>
    
    <h2>Latest Posts by <?php echo $curauth->nickname; ?></h2>
    <!-- Find out how to do showposts= to display all posts by an author -->
    
    <div style="float:right;">
    <?php userphoto($wp_query->get_queried_object()) ?>
    </div>
    <p><?php echo $curauth->user_description; ?></p>
    
    <ul>
    <!-- The Loop -->
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
      <li>
    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
    <?php the_title(); ?></a> on
    <?php the_time('F jS, Y'); ?>
      </li>
    
      <?php endwhile; else: ?>
         <p><?php _e('No posts by this author.'); ?></p>
    
    	<?php endif; ?>
    <!-- End Loop -->
    </ul>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Thank you!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Getting author pages to display more than default number of posts’ is closed to new replies.