WordPress.org

Ready to get started?Download WordPress

Forums

Author page (5 posts)

  1. dailyknight
    Member
    Posted 9 years ago #

    Hi, I am looking for a way to get the current author's info outside of the loop, so that when one visits an author page, I can put an appropriate header on each page and not each post.

    This plugin comes close, but you can only work with one predefined author ID at a time - and I just want to use the "current" author, not the one whose ID I put in my template.

    I know this has been addressed before, but the information is all in bits and pieces that I can't quite put all together. So could somebody please provide a detailed step-by-step explanation of how to do this? Thanks.

  2. soupenvy
    Member
    Posted 9 years ago #

    Hey dailyknight - I just posted the same question, today too: http://wordpress.org/support/topic.php?id=27554

    Let's let each other know - if & when we figure this out.

  3. Kafkaesqui

    Posted 9 years ago #

  4. dailyknight
    Member
    Posted 9 years ago #

    yep that does it - thanks

  5. wendell
    Member
    Posted 9 years ago #

    I used a counter in THE LOOP, which I got from http://centripetalforces.com/2005/04/30/under-the-wp-bonnet-2/

    The first loop puts down the author info and the first post, then some aside content, followed by the remaining posts and navigation links. This is the only whay I figure you can do this since the author tags have to be called in the loop


    <?php if (have_posts()) : ?>
    <?php $i = 0; ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php $numcontents = 1; ?>
    <?php if ($i < $numcontents ){ ?>

    <?php // Author name, description ?>
    <?php // First post, single block ?>

    <?php $i++; ?>
    <?php if ($i == $numcontents ); ?>
    <?php // Added some aside fun stuff here ?>
    <?php } else { ?>
    <?php // do a summarised post block ?>
    <?php } ?> <?php endwhile; ?>
    <?php // display link to archives ?>
    <?php endif; ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.