I am trying to add the current post's author as the content for the meta author tag. I wrapped this particular meta in an is_single
condition and then tried:
<meta name="author" content="<?php get_the_author(); ?>" />
as well as tried this:
<meta name="author" content="<?php the_author(); ?>" />
For both the above, Facebook debugger responded with:
Meta with name instead of property : The meta tag on the page was specified with name 'author', which matches a configured property of this object type. It will be ignored unless specified with the meta property attribute instead of the meta name attribute.
Then I tried:
<meta property="article:author" content="<?php the_author(); ?>" />
as well as tried this:
<meta property="article:author" content="<?php get_the_author(); ?>" />
For both the above, Facebook debugger responded with:
Parser Mismatched Metadata : The parser's result for this metadata did not match the input metadata. Likely, this was caused by the data being ordered in an unexpected way, multiple values being given for a property only expecting a single value, or property values for a given property being mismatched. Here are the input properties that were not seen in the parsed result: 'article:author'.
What am I doing wrong as all of the above four metas just return a blank content (<meta name="author" content/>
) for the author
tag.
<head>....</head>
section so I think it's not within the loop.