- Blog
- Contact
- Plugins
- Affiliates
- Affiliates Enterprise
- Affiliates Pro
- Affiliates Pro Contact Form 7 Integration
- Affiliates Pro Ecwid Integration
- Affiliates Pro EDD Integration
- Affiliates Pro eShop Integration
- Affiliates Pro Jigoshop Integration
- Affiliates Pro PayPal Integration
- Affiliates Pro s2Member Integration
- Affiliates Pro TheCartPress Integration
- Affiliates Pro WooCommerce Integration
- Affiliates Pro WP e-Commerce Integration
- Affiliates by Username
- Affiliates Extra Fields
- Affiliates Products
- Affiliates Share
- Affiliates Users
- Decent Comments
- FrankenCookie
- Groups
- Itthinx LazyLoader
- Lazy Widget Loader
- Open Graph Protocol
- Useful Plugins
- Support
- Shop
Check this out
Recent comments …
kento on Affiliates Pro PayPal IntegrationHi Stefan, There's a plugin which hasn't been released yet that...
antonio on GroupsYou can use [groups_member] and [groups_non_member] shortcodes for this purpose. cheers...
kento on Error Empty CaptchaIt's the SI CAPTCHA Anti-Spam plugin interfering where it shouldn't. You...

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
Open Graph Protocol

Download
Download the free Open Graph Protocol plugin for WordPress.
Description
The Open Graph protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook.
This WordPress plugin is aimed at automating the process of adding basic and optional metadata to a site’s pages. It is also designed to act as a framework for other plugins or themes and allows to modify and adapt the information provided as needed.
Usage
Install and activate the plugin. It will automatically render the following metadata for posts, pages, etc. :
og:title: The page’s title is used, this provides the title for posts, pages, archives etc.og:type: The type will bearticlein general,websitefor the front page andblogfor the blog homepage.og:image: For post types that support featured images, the URL of the featured image is used. Additional metadataog:image:widthandog:image:heightis added.og:url: The URL of the current page.og:site_name: The name of the site.og:description: Uses the full excerpt if available, otherwise derives it from the content. For author and archive pages, the type of page and title is used.
Filters
This section is for developers. If you’re not a developer, you can safely skip it.
The plugin provides the following filters:
open_graph_protocol_meta
This filter allows to modify the value of the content attribute for a given meta tag. It is invoked for every supported type of metadata.
Parameters:
stringcontent– the current value of thecontentattributestringproperty– the metadata name, for exampleog:title
Filters must return:
stringthe desired value of thecontentattribute
open_graph_protocol_meta_tag
This filter allows to modify the actual HTML <meta> tag that is rendered in the <head> section of pages.
Parameters:
stringHTML<meta>tagstringproperty– the metadata name, for exampleog:titlestringcontent– the value of thecontentattribute
Filters must return: – string the desired output for the HTML <meta> tag
open_graph_protocol_metas
This filter allows to add or remove metadata before it is rendered.
Parameters:
arrayof metadata indexed by metadata name
Filters must return: – array of metadata indexed by metadata name
open_graph_protocol_echo_metas
This filter allows to modify the HTML that renders the plugin’s meta tags in the <head> section.
Parameters:
stringHTML with<meta>tags to be rendered
Filters must return: – string HTML with <meta> tags to be rendered
Why this plugin?
This plugin was created because we needed an extendable way to render meta tags based on the Open Graph protocol, which would allow to modify the meta tag content rendered or add meta tags when appropriate based on external data.
None of the existing plugins provided a sufficiently flexible way of doing that, among other reasons we needed a solution that would comply with all of these requirements and none of the existing solutions does:
- must be compatible with WordPress 3.5
- must automatically add meta tags for featured images
- must be automated and create sensible meta tag content for each page, we don’t want to manually indicate the tag content for every page
- must provide a framework for extension through hooks and filters on every tag, and provide a design that allows other plugins to modify the meta tags in flexible ways
- must not ask to provide your Facebook account details or application ID when there is no need for it
- must not be bloated with features you don’t want or need when you simply want Open Graph metatags to be rendered automatically for your pages



Looks like another awesome plugin sir!
Thank you sir
By the way it’s going to be available on wordpress.org, I’ll post an update when it’s been committed to the repository there. It will be at http://wordpress.org/extend/plugins/open-graph-protocol-framework/
It’s hosted on WordPress.org now Open Graph Protocol Framework.
Thanks for this plugin Kento this is one nice Christmas present! easiest facebook open graph plugin I have used yet. I am using it on my website http://johnrlive.com
Cool
Thanks for using it!
Hi Kento,
That plugin is exactly what I was looking for, unfortunately it does not add a ög:image tag on my blog http://www.cadcam-blog.de. It’s installed since article http://cadcam-blog.k-magazin.de/?p=6372.
Any ideas?
Cheers, Ralf
Hi,
Open Graph protocol use for og:image the “featured image”, you must set the featured image’s post/page.
cheers
Hi Antonio,
problem is my theme doesn’t support featured images, it’s a rather old, but (internally) heavily reprogrammed theme. We look into if we can activate featured images, but it woulsd be nice if the plugin just used the first image in a post when there’s no featured image.
Take it easy, Ralf
Hi,
maybe if you use a featured image, even though the theme doesn’t use it. I’m not sure, but you could try it.
cheers.
Hi Kento,
this is a great plugin! I’ve just installed it on my blog and it works out of the box.
But one little issue I have: When I try to publish my homepage on google+ for example it shows my blogname in the description field. Everything is ok on a post page but not on the homepage.
Can you change this, that the plugin uses the wordpress description field for the open graph description tag?
Thanks a lot,
Marc
Now I have modified your file
class-open-graph-protocol-meta.php
in the function
public static function wp_head()
to include the site description if is_home() is true
} else if ( is_home() ) {
$description = get_bloginfo( ‘description’ );
I hope you will integrate this in your plugin.
Thanks Marc, I’ll review it and include the appropriate changes