WordPress themes not showing author bylines explained

Screenshot by Josh, a WordPress Happiness Engineer

The other day, I expressed my concern on the WordPress Support Forums that my author bylines were gone from my posts in this blog using the Twenty Twelve theme. Today I got a response from staff explaining that, because of feedback from the WordPress community, they started using CSS (the style markup that composes the themes) to hide the author byline on some, but not all, themes. This makes the byline invisible in the normal, theme/CSS-enabled view, but if you view the page without the theme/CSS you will see the bylines. This means the search engines can read the bylines and verify authorship. I checked this with Google’s Rich Snippet Testing Tool and found the search engine did, in fact, read my byline and verify my authorship. This is good to know!

For anyone who knows HTML and CSS and is curious, here is the HTML:

<span class="by-author"> by <a title="View all posts by Daniel Greene" href="http://messagesandmeans.danielgreene.com/author/danielgreene/" rel="author">Daniel Greene</a></span>

And here is the CSS that does the trick:

.by-author {display: none;}

If you are interested in viewing the code on your own blog, there are various ways to view source code.

3 thoughts on “WordPress themes not showing author bylines explained”

  1. Daniel,
    I just created a WordPress blog (hosted at Dreamhost) and am using the free Sundance theme. It displays the byline when I click the “Preview” button, to preview a new post. But it does not display a byline in the blog when the post is published. This seems to be the problem you’re speaking of. But I don’t understand your solution to this problem. Your link to “ways to view source code” does not work.

    1. The link works, Brent. I notice, though, if you mouse over just so, the tooltip from the code above may block part of it so you can’t click on it. My solution is simply to accept that my byline will not show in certain themes, but it will show to search engines that ignore the style that hides the byline. Google “CSS display:none” to read more.

Comments welcome

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s