{"id":1276,"date":"2017-12-08T12:23:03","date_gmt":"2017-12-08T09:23:03","guid":{"rendered":"https:\/\/wpreviewspro.com\/?p=1276"},"modified":"2017-12-08T12:23:03","modified_gmt":"2017-12-08T09:23:03","slug":"manually-create-a-custom-author-page","status":"publish","type":"post","link":"https:\/\/humble-yellow-mule.74-50-76-122.cpanel.site\/?p=1276","title":{"rendered":"How to Manually Create a Custom Author Page in Your WP Theme [2022]"},"content":{"rendered":"\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-left kksr-valign-top\"\n    data-payload='{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;1276&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;top&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;3&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;1&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;1\\\/5 - (3 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;How to Manually Create a Custom Author Page in Your WP Theme [2022]&quot;,&quot;width&quot;:&quot;26.5&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 26.5px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            1\/5 - (3 votes)    <\/div>\n    <\/div>\n<p>Due to the relatively small number of <a href=\"https:\/\/wpneon.com\/how-to-create-your-own-cryptocurrency-blog-with-wordpress\/\">WordPress blogs<\/a> with multiple authors, very few <a href=\"https:\/\/wpneon.com\/search\/?review-category=themes\">WordPress themes<\/a> include a custom author page.<\/p>\n<p>This means that whenever someone visits an author archive, WordPress will typically use your author.php template. If that file is not available, WordPress falls back to archive.php and then index.php. This often does not make for a very useful author page because it displays that author&#8217;s posts in the same format as other archives.<\/p>\n<h2 style=\"text-align: center;\">How to Manually Create a Custom Author Page<\/h2>\n<hr \/>\n<p>To create an author page, make a copy of your archive.php file, rename it author.php, and <a href=\"https:\/\/www.youtube.com\/watch?v=FkBaqVGEug0\" target=\"_blank\" rel=\"noopener noreferrer\">upload it to your site using SFTP<\/a>.<\/p>\n<p>Another option is to open your theme folder using SFTP, create an author.php file, and copy the contents of archive.php into your new author.php template. If you are working with a classic theme, use a child theme so your changes are not lost when the parent theme updates.<\/p>\n<p>You then need to edit the author.php file you created. The exact code will vary between themes, but you will generally need to customize the post loop for this template.<\/p>\n<p><strong>Note:<\/strong> Some themes already include an author.php file, so you can edit that file instead of creating a new one.<\/p>\n<p>A typical archive template calls the header and then finishes by calling the sidebar and footer. We will change the code between those calls. Here is an example of what a custom author template can use between the header and sidebar\/footer calls:<\/p>\n<p><!-- This sets the $curauth variable --><br \/>\n&lt;?php $curauth = get_queried_object(); ?&gt;<\/p>\n<h3>About: &lt;?php echo esc_html( $curauth-&gt;display_name ); ?&gt;<\/h3>\n<p><strong>Website:<\/strong> &lt;?php if ( ! empty( $curauth-&gt;user_url ) ) : ?&gt;&lt;a href=&#8221;&lt;?php echo esc_url( $curauth-&gt;user_url ); ?&gt;&#8221;&gt;&lt;?php echo esc_html( $curauth-&gt;user_url ); ?&gt;&lt;\/a&gt;&lt;?php endif; ?&gt;<\/p>\n<p><strong>Profile:<\/strong> &lt;?php echo esc_html( $curauth-&gt;description ); ?&gt;<\/p>\n<h3>Posts by &lt;?php echo esc_html( $curauth-&gt;display_name ); ?&gt;:<\/h3>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n&lt;?php if ( have_posts() ) : ?&gt;<br \/>\n&lt;?php while ( have_posts() ) : the_post(); ?&gt;<\/p>\n<li><a href=\"&lt;?php the_permalink(); ?&gt;\">&lt;?php the_title(); ?&gt;<\/a><\/li>\n<p>&lt;?php endwhile; ?&gt;<br \/>\n&lt;?php else : ?&gt;<\/p>\n<li>&lt;?php esc_html_e( &#8216;No posts by this author.&#8217; ); ?&gt;<\/li>\n<p>&lt;?php endif; ?&gt;\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>This displays the author&#8217;s display name, website, profile description, and a list of their posts. Once the template is set up, you can manage the author&#8217;s profile information from the Users screen in your WordPress dashboard. For more details about the available author-template functions and template hierarchy, see the <a href=\"https:\/\/developer.wordpress.org\/themes\/classic-themes\/templates\/author-template-files\/\" target=\"_blank\" rel=\"noopener noreferrer\">official WordPress author-template documentation<\/a>.<\/p>\n<p>As an added bonus, you can make an author&#8217;s name link to their author archive with the following code:<\/p>\n<p>&lt;a href=&#8221;&lt;?php echo esc_url( get_author_posts_url( get_the_author_meta( &#8216;ID&#8217; ) ) ); ?&gt;&#8221;&gt;&lt;?php the_author(); ?&gt;&lt;\/a&gt;<\/p>\n<p style=\"font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 500; font-size: 16px; font-family: Raleway;\">I hope this article helped you learn how to manually create a custom author page without using a plugin.<\/p>\n<p style=\"font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 500; font-size: 16px; font-family: Raleway;\">If you liked this article, please subscribe to our weekly newsletter to get notified about new WordPress guides, tips, deals, and much more.<\/p>\n<div id=\"themify_builder_content-1276\" data-postid=\"1276\" class=\"themify_builder_content themify_builder_content-1276 themify_builder\">\n    <\/div>\n<!-- \/themify_builder_content -->\n","protected":false},"excerpt":{"rendered":"<p>Due to the relatively small number of WordPress blogs with multiple authors, very few WordPress themes include a custom author page. This means that whenever someone visits an author archive, WordPress will typically use your author.php template. If that file is not available, WordPress falls back to archive.php and then index.php. This often does not [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1284,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[130,131,997,1283,1290],"class_list":["post-1276","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","tag-author-template","tag-author-php","tag-template-hierarchy","tag-wordpressauthorpage","tag-wordpressthemes","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""," cat-19"],"builder_content":"","_links":{"self":[{"href":"https:\/\/humble-yellow-mule.74-50-76-122.cpanel.site\/index.php?rest_route=\/wp\/v2\/posts\/1276","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/humble-yellow-mule.74-50-76-122.cpanel.site\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/humble-yellow-mule.74-50-76-122.cpanel.site\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/humble-yellow-mule.74-50-76-122.cpanel.site\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/humble-yellow-mule.74-50-76-122.cpanel.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1276"}],"version-history":[{"count":0,"href":"https:\/\/humble-yellow-mule.74-50-76-122.cpanel.site\/index.php?rest_route=\/wp\/v2\/posts\/1276\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/humble-yellow-mule.74-50-76-122.cpanel.site\/index.php?rest_route=\/wp\/v2\/media\/1284"}],"wp:attachment":[{"href":"https:\/\/humble-yellow-mule.74-50-76-122.cpanel.site\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/humble-yellow-mule.74-50-76-122.cpanel.site\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/humble-yellow-mule.74-50-76-122.cpanel.site\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}