WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] author description on top of author page (4 posts)

  1. euro2000
    Member
    Posted 8 years ago #

    Hi there,

    I want to publish a discription of the author on the very top of the author-page that lists all the posts of that author.

    the problem is that the_author_description() must be used within the loop. If I use it in the main loop, the description is published with every post, rather than just once.

    To get around this, I tried setting up an extra loop right before the main query. Problem is, I only need to go through this loop once. How can I do that? Or what other solutions could i try?

    I did try to use query_posts('showposts=1'), but than the miniloop takes the latest overall post, rather than the latest post of the author whose page is displayed. Strangely enough, this tactic does work at the category-page.

    So: this works:

    <?php if (is_category())
    {query_posts('showposts=1');
    while (have_posts()) : the_post(); echo category_description ();
    endwhile;}

    but the same miniloop with the_author_description gives the description of the last author of the whole blog rather than the description of the author whose page we are viewing.

    Please help :-)

    best

    Martijn

  2. Lorelle
    Member
    Posted 8 years ago #

    Have you looked at creating a custom author page at Author Templates? That might help you.

  3. euro2000
    Member
    Posted 8 years ago #

    thanks, that helped a lot!

  4. Beel
    Member
    Posted 8 years ago #

    Oops, wrong thread ;-)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags