How to Add a Custom Author Profile Page In WordPress

[easy-social-share counters=0 style="button"]

In case you have a multi-author weblog, it is wise to insert an author’s user profile web page to your own WordPress blog. An author web page bring the readers close to their favorite authors when you have a few background important information shown in their profile.

Despondently, most of the totally free WordPress themes or templates will notate produced with a custom author.php which is the reason this article are a good idea. On this article, i will be displaying you how you can insert a custom author profile web page to your own WordPress blog.

Simply because most of the totally free themes or templates do not actually have a custom author.php data file, WordPress automatically callback to archive.php and index.php when somebody views the author profile web page. The issue with that is that it will be able to only listing almost all the posts published by the author, also it provides not any private details about the author.
It is strongly recommended that you simply copy your own archive.php and also save it as author.php and then insert the codes from the small sample below to customize your own web page matching the theme configuration settings:

 

<?php get_header(); ?>

<div id="content" class="narrowcolumn">

<!– This sets the $curauth variable –>

<?php
if(isset($_GET['author_name'])) :
$curauth = get_userdatabylogin($author_name);
else :
$curauth = get_userdata(intval($author));
endif;
?>

<h2>About: <?php echo $curauth->nickname; ?></h2>
<dl>
<dt>Website</dt>
<dd><a href="<?php echo $curauth->user_url; ?>" rel="nofollow" ><?php echo $curauth->user_url; ?></a></dd>
<dt>Profile</dt>
<dd><?php echo $curauth->user_description; ?></dd>
</dl>

<h2>Posts by <?php echo $curauth->nickname; ?>:</h2>

<ul>
<!– The Loop –>

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" rel="nofollow" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
<?php the_title(); ?></a>,
<?php the_time('d M Y'); ?> in <?php the_category('&');?>
</li>

<?php endwhile; else: ?>
<p><?php _e('No posts by this author.'); ?></p>

<?php endif; ?>

<!– End Loop –>

</ul>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

This web page above can show: Author’s nickname, their web site, background facts and information (whatever you decide to place in the detailed description area), or a listing of posts published by this particular author.

Almost all of the background details and also facts and information will probably be managed from the Profile web page in the admin panel. There are few other plugins that can let you insert images or other extra features in multi-author blog sites.

Now this time that you have set up the custom author profile web page, you would like to make sure your own single.php, as well as your own index.php both of these are pointing out the author’s profile url when ever the name is mentioned.

Often when themes do not provide a custom author web page, they tend to url to author’s web siteLink in the “written by” part of each and every post.

So that you should try to find words just like Written by and some thing along the similar collection and also exchange the codes using this snippet, in case you do not need that code, then you certainly would like to insert the code below anyways in order to provide your users with a web link to author’s profile web page.

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

Another excellent method of letting your own users find out about author profiles web page is simply by listing all of the authors from a blog using one web page, or just in the sidebar.

We now have written an articles with this in the past that provides both of them a raw code answer or a plugin answer, so that take a look at our article on how exactly to list all of the authors from a blog in WordPress.

Hope you all like this Tuts byCodiTuts.com, if yes then keep us supporting by sharing this post, Cheerful Coding smiley.

Submit a comment

Pin It on Pinterest