Display author name in wordpress

Look in the default theme’s index.php file for the proper template tag:

<code><?php the_author() ?></code>

and a good place to put it.

Display Author’s ‘Public’ Name

Displays the value in the user’s Display name publicly as field.

<p>This post was written by <?php the_author(); ?></p>

Get Author link

<p>Written by:
<?php echo get_the_author_link(); ?></p>

The Author’s Post

<p><?php the_author(); ?> has blogged <?php the_author_posts(); ?></pre>

The Author’s Post Link

<p>Other posts by <?php the_author_posts_link(); ?></p>

for more info check below URL

1 comment

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.