Skip to content

Instantly share code, notes, and snippets.

View paperrobots's full-sized avatar

Matthew Restorff paperrobots

View GitHub Profile
@paperrobots
paperrobots / functions.php
Last active September 22, 2016 19:43
Add Open Graph tags to Wordpress
function doctype_opengraph($output) {
return $output . '
xmlns:og="http://opengraphprotocol.org/schema/"
xmlns:fb="http://www.facebook.com/2008/fbml"';
}
add_filter('language_attributes', 'doctype_opengraph');
function fb_opengraph() {
global $post;