{"id":373,"date":"2011-05-25T22:20:11","date_gmt":"2011-05-25T22:20:11","guid":{"rendered":"http:\/\/wp4design.com\/?p=373"},"modified":"2012-02-26T15:44:36","modified_gmt":"2012-02-26T14:44:36","slug":"using-the_author_meta","status":"publish","type":"post","link":"http:\/\/4design.xyz\/wordpress-basics\/using-the_author_meta","title":{"rendered":"Using the_author_meta() to fill the meta name=&#8221;author&#8221; tag"},"content":{"rendered":"<p>When it comes to garnish the meta tag &#8220;author&#8221; located between the <code>&lt;head&gt;<\/code> tags of your website &#8212; like <code>&lt;meta name=\"author\" content=\"Bruno Bichet\"&gt;<\/code> &#8212; you can use <code>the_author_meta()<\/code>. At first, this function seems to be used inside <a href=\"http:\/\/codex.wordpress.org\/The_Loop\">The Loop<\/a> which doesn&#8217;t help very much in this case, but it can be used outside The Loop when the ID of the author is passed as parameter.<!--more--><\/p>\n<p>This way, I can display the name and forename that the admin filled in <em>wp-admin\/profile.php<\/em>. All that stuff is achieved like this :<\/p>\n<pre>&lt;meta name=\"author\" content=\"&lt;?php the_author_meta('display_name', 1); ?&gt;\"&gt;<\/pre>\n<p>\u2192 <a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/the_author_meta\">http:\/\/codex.wordpress.org\/Function_Reference\/the_author_meta<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When it comes to garnish the meta tag &#8220;author&#8221; located between the &lt;head&gt; tags of your website &#8212; like &lt;meta name=&#8221;author&#8221; content=&#8221;Bruno Bichet&#8221;&gt; &#8212; you can use the_author_meta(). At first, this function seems to be used inside The Loop which doesn&#8217;t help very much in this case, but it can be used &hellip; <a href=\"http:\/\/4design.xyz\/wordpress-basics\/using-the_author_meta\" rel=\"nofollow\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[65,101,139,143],"_links":{"self":[{"href":"http:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/posts\/373"}],"collection":[{"href":"http:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/comments?post=373"}],"version-history":[{"count":0,"href":"http:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/posts\/373\/revisions"}],"wp:attachment":[{"href":"http:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/media?parent=373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/categories?post=373"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/tags?post=373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}