Easily add tracking code snippets, conversion pixels, or other scripts required by third party services for analytics, marketing,…
About Open Graph
The Open Graph protocol allows web pages to be used with Facebook's Like Button and Graph API, as well as within Twitter posts. The Open Graph plugin inserts metadata into WordPress posts and provides a way for other plugins and themes to override or add additional Open Graph data. It doesn't directly add social plugins to your pages, but it improves how your pages look when shared using those tools.Frequently asked questions
What does the Open Graph plugin do?
The Open Graph plugin inserts Open Graph metadata into WordPress posts and pages. This metadata allows web pages to become rich objects in a social graph, improving their appearance when shared on platforms like Facebook and Twitter.
Does this plugin add social sharing buttons?
No, this plugin does not directly add social plugins like the Facebook Like Button to your pages. Its primary function is to make your pages look great when shared using those kinds of tools.
Can other plugins or themes customize the Open Graph data?
Yes, the plugin provides a simple extension mechanism. This allows other plugins and themes to override existing Open Graph data or to provide additional Open Graph information.
Changelog
Project maintained on github at pfefferle/wordpress-opengraph.
2.0.2 (Feb 25, 2025)
- Add a constant to easily change the max number of images to be included in the OpenGraph meta tags.
2.0.1 (Dec 16, 2024)
- Fixed a warning
- Improved
opengraph_max_imageshandling
2.0.0 (Dec 01, 2024)
- complete rewrite of image handling
- added support for block images
- added parsing of HTML
<img>tags - improved WordPress Coding Standards compliance
1.12.2 (Nov 17, 2024)
- optimized readme and updated dependencies
1.12.1 (Jul 15, 2024)
- fix fediverse account normalization
1.12.0 (Jul 3, 2024)
- support
<meta name="fediverse:creator" />
1.11.3 (Jun 4, 2024)
- don’t return description for password protected posts
1.11.2 (Nov 13, 2023)
- stript tags from title, site-name and description
1.11.1 (Apr 03, 2023)
- fixed a typo
1.11.0 (Oct 21, 2021)
- fixed attachment issue
- fixed PHP 7.4 issue
1.10.0 (Apr 20, 2020)
- basic video support
- basic audio support
1.9.0 (Mai 14, 2019)
- show only featured image if available
- prefer header images over site-icon
- use avatar for profile pages
- fallback to description if title is empty
- better twitter
cardhandling
1.8.3 (Jan 27, 2019)
- added escaping for the missing attributes
1.8.2 (Nov 21, 2018)
- fixed PHP warning issue: https://wordpress.org/support/topic/php-warning-count-parameter-must-be-an-array-or-an-object-that-implements-c/
1.8.1 (Nov 19, 2016)
- change
og:imageto use the full size of image (props @torenord)
1.8.0 (Jan 29, 2016)
- fixed
article:authorproperty - added
article:modified_time - added first category as
article:section
1.7.0 (Jan 18, 2016)
- added “strict mode” setting
- better twitter:card handling
- basic twitter:creator support
- WordPress coding standard
1.6 (Dec 30, 2014)
- implemented
get_the_archive_titleandget_the_archive_description(new in WordPress 4.1) - basic twitter cards support (thanks to elroyjetson)
- replace
$post->post_titlewithget_the_title()(see #17 for details)
1.5.1 (Nov 13, 2012)
- fix duplicate opengraph markup when used with jetpack plugin (for real)
1.5 (Nov 13, 2012)
- include descriptions on tag and category pages
- include profile metadata on author pages
- fix bug with 404 pages include extra og:image values
- general code cleanup (including removal of dependency on global vars)
- fix duplicate opengraph markup when used with jetpack plugin
1.4 (Aug 24, 2012)
- better default description
- include all images that are attached to a post, so that users can choose
which to use when sharing the page. If the post has a post thumbnail, that
is still used as the primary image.
1.3 (May 21, 2012)
- add ‘opengraph_prefixes’ filter for defining additional prefixes
- add new basic properties, and remove some old ones. This is a breaking
change for anyone that was using the old properties, but they can always be
added using the ‘opengraph_metadata’ filter. (see f476552 for details) - updates to many default values, particularly for individual posts and pages
(thanks pfefferle) - add basic support for array values (see d987eb7)
1.2 (Feb 21, 2012)
- switch to newer RDFa prefix syntax rather than XML namespaces (props
pfefferle)
1.1 (Nov 7, 2011)
- fix function undefined error when theme doesn’t support post thumbnails
1.0 (Apr 24, 2010)
- initial public release