Skip to content

Instantly share code, notes, and snippets.

@sloped
Created March 19, 2012 16:18
Show Gist options
  • Save sloped/2117805 to your computer and use it in GitHub Desktop.
Save sloped/2117805 to your computer and use it in GitHub Desktop.
Open Graph Tags Wordpress
<?php
// Outputs the appropriate tags for Facebook Open Graph. Call using wp_head() action hook. Could be customized using conditional template tags for pages/posts/custom posts.
function fb_metatags() { ?>
<meta property="og:title" content="Page or Site Title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://url.com" />
<meta property="og:image" content="**url for image, could use wp-thumbnails here**" />
<meta property="og:site_name" content="Site Title" />
<meta property="fb:admins" content="#######" />
<?php }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment