How To Set Up WordPress Social Metadata

by Search Influence Alumni

We couldn’t be prouder to announce that our own Doug Thomas’s video has won the SEOMoz Youtube Contest! Social metadata, the hidden content that displays your content in a correct and attractive way on social media sites, is one of the most overlooked aspects of posting a blog or article, and this tutorial provides a concise and thorough explanation of how to utilize it. Metadata lets Facebook, Twitter, and Google+ know what title, description, and image to show in the preview on the site. To implement Facebook OpenGraph, Twitter Cards and Google+ Authorship, you now just need one <link> tag rather than the more complicated three-link monte from earlier. In this tutorial, we use built-in WordPress functions to edit the theme of your site to create a semi-automated, scalable way to correctly generate this metadata.



When we set this up, we use two sections of WordPress to push the data to the blog post. For the Twitter Cards and Authorship, you use unused fields in your User Profile like AIM and URL to house the information. For OpenGraph, the data is either pulled from Custom Fields or the post itself. If you can’t see Custom Fields under your post, go to Screen Options at the top of the Edit Post screen and check Custom Fields. By using what’s already existing in WordPress instead of a plugin, you avoid bloat in your database, reduce the risk of plugin conflicts, and make your code portable to other WordPress sites without having to install anything new.

Here’s the video, which will show you the code to set this up and a cute ferret. Enjoy!



Can’t Read the Code?