My end goal is to have Google+ authorship (rel=author & rel=me) in each node.

This function is not provided in the Meta Tags module (which does include Publisher ID, which is website wide, but this does not work for individual node authors on a site with multiple authors).

So what I have done so far is create a new profile field called: profile_googleplus

Users can now enter their google+ profile URL into this field by editing their user profile.

But what I want now is to insert a meta tag/link rel=author or rel=me into each node, and use the "profile_googleplus" field for the node author.

How do I do this? Thank you!

Comments

pbeakley’s picture

You can hash this out via Views, and rewrite the output so that the correct tags end up embedded.

Here's how I did it in D6:

1) Enable Profile
2) Go to User Management -> Profile and add "Single-Line Textfield". Call it whatever.
3) Under the user's account management, look for the new subtab that handles that field. http://www.mydomain.com/user/1/edit/{FIELDNAME} for example.
4) Go to Views and build a View that outputs your content. If you're just using vanilla Drupal and don't do Views, you're pretty much out of luck at this point.
5) Add your new textfield from your Profile (there will now be a "Profile" section if you hadn't already activated this before), Exclude from View, and turn off "link to user". Make sure it's displayed before the username field.
6) Build out the byline field by adding the Username (or Realname or however you're displaying user name information) and rewriting the output. Turn off "link to user" for the username. Here's how mine came out:

by <a href="https://plus.google.com/[value]/about?rel=author" target="_blank">+[name]</a> | [created]

[value] is the Profile field you added, [name] is the username, [created] is the post date. The important bit of voodoo here is the ?rel=author bit at the end, and the + before the [name]. The target="_blank" is just my personal preference.

And that should do it.

This is super-quick-and-dirty and does not take into account users that don't have G+ profiles.

Hat tip to http://yoast.com/wordpress-rel-author-rel-me/