WordPress.org

Ready to get started?Download WordPress

Forums

Call the post per author (4 posts)

  1. weeklyfun
    Member
    Posted 6 years ago #

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

    [code]
    <!-- 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>
    <td valign="top" align="left"><?php the_time('j-n-Y'); ?></td>
    <td valign="top" align="left"><?php the_category(' &');?></td>
    </tr>

    <?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 -->
    [/code]

    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
    Member
    Posted 6 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
    Member
    Posted 6 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
    Member
    Posted 6 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