Call the post per author (4 posts)

  1. weeklyfun
    Posted 8 years ago #

    Hi, I use this code in author.php to call up the post the author has made:

    <!-- The Loop -->
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <tr onmouseover="this.style.backgroundColor='#a2c1db';" onmouseout="this.style.backgroundColor='transparent';">
    <td valign="top" align="left">
    " rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
    <?php the_title(); ?>
    <td valign="top" align="left"><?php the_time('j-n-Y'); ?></td>
    <td valign="top" align="left"><?php the_category(' &');?></td>

    <?php endwhile; else: ?>
    <tr><td valign="middle" align="center" colspan="3"><b><?php _e('Geen, niks, nada, niente, noppes.'); ?></b></td></tr>

    <?php endif; ?>
    <!-- End Loop -->

    As you can see it uses the loop, so It only calls the last , in my case, 10 posts from the author. I want to call all the posts made by the author. How can I do that?

  2. MichaelH
    Posted 8 years ago #

    Wonder if that isn't a result of the Blog pages show at most [X] posts setting in Administration > Settings > Reading

  3. weeklyfun
    Posted 8 years ago #

    Yes it is. And that´s what I want do not want to use in this code. I want to show all the post made by the author. Any suggestions?

  4. MichaelH
    Posted 8 years ago #

    The template tag, query_posts(), has a posts_per_page=-1 parameter you could use.

Topic Closed

This topic has been closed to new replies.

About this Topic