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.
The Open Graph Protocol 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



Please follow the Support guidelines.
Premium Support is available for customers in the Forums.