WordPress.org

Ready to get started?Download WordPress

Forums

How to link author to his profile page? (4 posts)

  1. raygene
    Member
    Posted 6 years ago #

    Hi,

    My theme's index.php file has the following line to show the author:

    <small><?php the_time('F jS, Y') ?> by <?php the_author() ?> </small>

    Which would show "March 24th, 2008 by Gene".

    Is there a way to link Gene's (or other authors) to his public profile (for registered members only) when clicked on?

    Thanks,
    Gene

  2. whistler2020
    Member
    Posted 6 years ago #

    just wrap the link around the author code

    <small><?php the_time('F jS, Y') ?> by<a href=""><?php the_author() ?></a></small>

  3. raygene
    Member
    Posted 6 years ago #

    Thanks,

    Did the above and it does show the author's name as a link but when clicked on, only takes me back to the index page.

    Is there something missing in the href="" (between the ")? And BTW, I copied the author template in my theme's folder.

    Gene

  4. raygene
    Member
    Posted 6 years ago #

    Also, once the solution is found, I assume the same code could be used in the comment.php file?

    Gene

Topic Closed

This topic has been closed to new replies.

About this Topic