Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Restorff paperrobots

View GitHub Profile
@paperrobots
paperrobots / functions.php
Last active Sep 22, 2016
Add Open Graph tags to Wordpress
View functions.php
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;