Skip to main content
Agency Program Get 2× more leads and save 50% on hosting. Built for agencies ready to grow. Book a call
OG — Better Share on Social Media icon

OG — Better Share on Social Media

v3.3.3
by Marcin Pietrzak · 4.8 (208 reviews)

The simple method to add Open Graph metadata to your entries so that they look great when shared on sites.

30K+ active installs Updated Dec 09, 2024 Tested to 6.7.2 Requires PHP 8.0
Try Demo Download
Pre-installed Ready in ~10s No card
OG — Better Share on Social Media

About OG — Better Share on Social Media

This plugin is designed for beginners and requires no configuration. All you need to do is install and activate it, and it will take care of everything for you.

Frequently asked questions

How do I report bugs?
You can report bugs by creating a new topic in the plugin forum. Once verified, a bug report will be created in GitHub. Developers will then work on resolving the issue.
How can I suggest new features?
To suggest new features, create a new topic in the plugin forum. Share your thoughts on why the feature should be included to start a discussion.
How can developers contribute?
Developers can contribute by issuing Pull Requests on issues already reported in GitHub. Be sure to check out the contributing guide for developers.

Changelog

Project maintained on github at iworks/og.

3.3.3 (2024-12-09)

  • The loading integrations action has been fixed.

3.3.2 (2024-12-05)

  • The iWorks Rate module has been updated to version 2.2.1.
  • Translation loading time has been fixed. #16

3.3.1 (2024-07-21)

  • The iWorks Rate module has been updated to version 2.1.9.

3.3.0 (2024-02-14)

  • An issue with the WPML plugin has been fixed. #15. Props for Armsportstore.com.
  • The iWorks Rate module has been updated to version 2.1.6.
  • Include files have been hardened.
  • Integration with the [WooCommerce] plugin has been improved.
  • Integration with the [Debug Bar] plugin has been added.

3.2.7 (2023-12-21)

  • The filter og/term/meta/thumbnail_id_name has been added. It allows you to change the term meta name with a thumbnail ID (the default is image). Props for John. #14
  • The filter og/term/meta/thumbnail_url has been added. It allows you to change the term meta name with a thumbnail src (the default is image_url).
  • The iWorks Rate module has been updated to version 2.1.6.

3.2.6 (2023-12-01)

  • Quotations have been removed from $wpdb->prepare().
  • The function date() has been replaced by the function gmdate().
  • The function strip_tags() has been replaced by the function wp_strip_all_tags().
  • The iWorks Rate module has been updated to version 2.1.4. #13
  • The usage of WPDB objects has been improved.

3.2.5 (2023-11-20)

  • When a site was in debug mode, the set_transient() function was called improperly. It has been fixed. Props for X-Raym & John Blackbourn.

3.2.4 (2023-11-02)

  • Schema “tagline” has been removed by default. Use the og_allow_to_use_schema_tagline filter to turn it on (not recommended).

3.2.3 (2023-06-09)

  • Schema “tagline” has been set as the site slogan.

3.2.2 (2023-05-30)

  • The og:logo has been removed; it can be used with the filter allow_og_logo. See the FAQ for more details.
  • The og_logo_size filter has been added; it allows you to change the logo size; the default is “full”.
  • The get_site_logo() function has been refactored.
  • Unnecessary trailing slashes have been removed. Props for Oliver

3.2.1 (2023-04-18)

  • Added og_image_size filter to allow changing default image size in OpenGraph data. Props for uk03.

3.2.0 (2023-04-18)

  • The transient cache has been disabled if site is in WP_DEBUG mode.
  • The property og:logo has been added.
  • An additional check for the wp_get_attachment_image_src() function has been added. Props for mauroaddari.
  • Added integration with WPML to set og:locale:alternate for single entries.

3.1.9 (2022-11-21)

  • Added og_head_link_rel_image_src_enabled filter to disable head link output.
  • Added og_head_meta_title_image_enabled filter to disable head meta output.

3.1.8 (2022-11-08)

  • Fixed two PHP warnings due to a lack of an array index. Props for Leonidas.

3.1.7 (2022-08-16)

  • Fixed issue with Reading Time WP it returns a string instead of a number if the reading time is less than 1 minute. Props for Radosław Serba.

3.1.6 (2022-08-05)

  • Removed post data if it is a password protected entry (content, taxonomies). Props for [cris](http://og.iworks.pl/2022/06/23/3-1-5/#comment-3].

3.1.5 (2022-06-23)

  • Added integration with  the Twitter plugin to use data from this plugin: twitter:site, twitter:widgets and single content settings.

3.1.4 (2022-06-02)

3.1.3 (2022-05-11)

  • Fixed PHP warning when image has no alt. Props for samoreen.
  • Fixed try to set cache for an empty value.

3.1.2 (2022-02-25)

  • Added check is an array for og:image to avoid warning. Props for Charles Smith.
  • Changed Plugin URI from http://iworks.pl/en/plugins/og/ to http://og.iworks.pl/.

3.1.1 (2022-02-24)

  • Featured image for single content should be first.
  • Added limit to Pinterest og:see_also. It must be 6 or fewer.

3.1.0 (2022-02-23)

3.0.3 (2022-02-23)

  • Added the filter og_is_schema_org_enabled to disable Schema.org output.
  • Updated iWorks Rate to 2.1.0.

3.0.2 (2022-02-12)

  • Fixed the misspelled filter name og_wp_head_prioryty into og_wp_head_priority. Props for Armsportstore.com.

3.0.1 (2022-02-10)

  • Excludes itemscope for the WP-Sitemap stylesheet. Props for Jasper
  • Fixed article:author values, according to ogp.me
  • Unified article:author and profile values.

3.0.0 (2022-02-09)

2.9.9 (2022-02-08)

  • Fixed older PHP issues.

2.9.8 (2022-02-08)

  • Added for itemscope itemtype to HTML using language_attributes filter. Props for Michał Ruszczyk.

2.9.7 (2022-02-03)

  • Added integration with the plugin Categories Images.
  • Added the filter filter_og_get_image_dimensions_by_id to allow getting image data by attachment_ID.
  • Added twitter:image:alt.
  • Shortened twitter:description length to 200 characters. More: Cards.

2.9.6 (2022-01-20)

  • Updated iWorks Rate to 2.0.6.

2.9.5 (2021-12-29)

  • Added the filter og_wp_head_priority to allow changing wp_head priority.

2.9.4 (2021-11-19)

  • Added og_og_array filter to a part of the OpenGraph array.
  • Added og_article_array filter to a part of the OpenGraph array.
  • Added og_twitter_array filter to a part of the OpenGraph array.
  • Added og_schema_array filter to a part of the OpenGraph array.
  • Added og_profile_array filter to a part of the OpenGraph array.
  • Added integration with Reading Time WP for Twitter.
  • Added support for twitter:label and twitter:data.

2.9.3 (2021-11-08)

  • Added author gravatar as twitter:image on author archive.
  • Added Schema.org HTML meta tags.
  • Fixed a missing og:url on an author archive page.
  • Fixed a missing Twitter on a single page.
  • Improved og:url for the search results page.
  • Renamed plugin into “OG – Better Share on Social Media”.
  • Updated iWorks Rate to 2.0.4.

2.9.2 (2021-06-30)

  • Added og:brand as integration with a few plugins.
  • Added og:description into author page (from user bio).
  • Added product:category for WooCommerce product categories.
  • Added product:retailer_item_id for WooCommerce SKU.
  • Added product:tags for WooCommerce product tags.
  • Updated iWorks Rate to 2.0.3.

2.9.1 (2021-06-23)

  • Added check that the image exists instead of just processing.
  • Renamed directory vendor into includes.
  • Updated iWorks Rate to 2.0.0.

2.9.0 (2021-03-31

  • Added og_allow_to_use_thumbnail filter to disable feature image as og:image.
  • Added og_allow_to_use_vimeo filter to disable Vimeo movie thumbnail as og:image.
  • Added og_allow_to_use_youtube filter to disable YouTube movie thumbnail as og:image.
  • Added og_check_add_video_thumbnails_by_post to disable the video from a post, by post (second parameter is $post).
  • Added og_get_locale to filter locale.
  • Added og_set_transient_expiration filter, default is DAY_IN_SECONDS.

2.8.9 (2020-10-21)

  • Added response code check for YouTube thumbnails. Props for Biblioteka Targówek.
  • Added fallback for YouTube thumbnails: maxresdefault -> hqdefault -> 0.

2.8.8 (2020-10-16)

  • Added is_author() page with og:profile values and user gravatar as og:image.

2.8.7 (2020-10-05)

  • Fixed og:image order issue, move thumbnail was offered first, instead of entry featured image. Props for Maurício Varallo II.

2.8.5 (2020-06-20)

  • Fixed minor issue with og:type.

2.8.4 (2020-06-20)

  • Added Pinterest og:see_also tag when YARPP plugin is used and post has related posts.
  • Fixed og:image:alt value, now we use ALT first.
  • Improved og:audio tag on audio attachment page.
  • Improved og:video tag on video attachment page.
  • Improved usage with Orphans plugin.

2.8.3 (2020-06-03)

  • Fixed problem with wrong database query param.

2.8.2 (2020-06-03)

  • Added Vimeo video support for og:image and og:video.
  • Improved default YouTube images, now it is saved with SSL.
  • Removed array sum code it is incompatible with older PHP.

2.8.1 (2020-06-03)

  • Added dimensions and type for YouTube images if it is possible.
  • Added filter og_twitter_creator for easy setup of Twitter @username of a creator.
  • Added multiple og:image for all YouTube movies.
  • Removed post meta for YouTube images when movies were deleted from the entry.
  • Use SSL for YouTube images if a site is on SSL.

2.8.0 (2020-06-03)

  • Removed Facebook check for allowed locales.
  • Fixed Twitter summary_large_image issue.
  • Added filter og_twitter_site to easy setup Twitter @username for site owner.

2.7.9 (2020-06-02)

  • Improved cache key – now it includes plugin version, to avoid getting older cache.

2.7.8 (2020-06-02)

  • Fixed an issue with no featured image, but with multiple images in the content. Props for anthonykung

2.7.7 (2020-06-01)

  • Added og:image:secure_url for images with HTTPS URL. Props for mociofiletto
  • Improved attachment page OpenGraph tags.
  • For entry without thumbnail get all content images into og:image.

2.7.6 (2019-08-18)

  • Added filter og_profile to allow change profile values. Props for edmorrow

2.7.5 (2019-05-15)

  • Fixed missing og:image:alt for featured image.

2.7.4 (2019-04-25)

  • Fixed a problem with og:image content for a document with featured image and images in the content. Props for sudoranger

2.7.3 (2019-04-23)

  • Added “summary_large_image” for twitter:card if attached image has a width bigger than 520px. Props for Bobby Eberle.

2.7.2 (2019-04-13)

2.7.1 (2019-04-13)

  • Added locale string into cache settings to be able to handle languages. Props for Oleksandr Omelchenko.
  • Added cache locale value inside the class object.

2.7.0 (2018-10-21)

  • Added proper og:url for custom post archive page. Props for cabaltc.
  • Added proper og:url for a day, month and year archive page.
  • Added proper og:url for a search result.
  • Added proper og:url for taxonomy archive page.
  • Removed OpenGraph from the 404 page.

2.6.2 (2018-10-11)

  • Fixed blog posts page og:url. Props for cabaltc.

2.6.1 (2018-09-06)

  • Added esc_url for image src value.
  • Striped tags from OG tag value.

2.6.0 (2018-06-04)

  • Added attached audio files to og:audio tag.
  • Added attached video files to og:video tag.
  • Added og:update_time tag.
  • Added transient cache for single entries to decrease DB usage.
  • Updated Facebook locales list.

2.5.3 (2018-05-09)

  • Remove debug function, which broke the whole plugin.

2.5.2 (2018-05-08)

  • Added filter og_description_words to allow change og:description length.
  • Fixed a problem with striping the last word. Props for intrex.
  • We are back to trim og:description to 55 words (it is the default for wp_trim_words() function).

2.5.1 (2018-04-16)

  • Added og:image:width and og:image:height for first content image from the site URL.

2.5.0 (2018-04-14)

  • Added og:image:width and og:image:height for featured image.

2.4.9 (2018-02-27)

  • Remove filter “the_content” to avoid incompatibility with some plugins.

2.4.8 (2018-02-19)

  • Added first content image to og:image if featured image is not set. Props for andreyenkin.

2.4.7 (2017-09-26)

  • Added filter “og_[og_name]_value” to change single og value.
  • Added og:type for post formats “audio” and “video”.
  • Fixed og:type for WooCommerce product. Props for shaharsol.

2.4.6 (2017-09-13)

  • Removed limit for og:description.

2.4.5 (2017-06-13)

  • Added filter “og_array” which allows to change the whole OG array before printing it.

2.4.4 (2017-05-20)

  • Fixed site crash when WooCommerce is active. Props for JLY.

2.4.3 (2017-05-09)

  • Update “Rate” module to 1.0.1 – fixed wrong rate URL for non-English.

2.4.2 (2017-05-03)

  • Added tags “og:video” and “twitter:player” for YouTube embed movies.
  • Added WooCommerce integration for tags: “og:price:amount”, “og:price:currency” and “og:availability”.
  • Improved description tag, when entry content is empty, add entry title as description.

2.4.1 (2016-10-26)

  • Fixed problem for pages and another single content. At this moment OG works for all types of single entries.
  • Added ask for the rating on the plugin page.
  • Short Twitter description.

2.4.0 (2016-04-10)

  • Fixed the problem with proper preparation for localization.
  • Fixed the profile by grabbing the YouTube image.
  • Implement WordPress code standard for PHP code used in the plugin.

2.3.0 (2016-02-03)

  • Added categories as og:section.
  • Added esc_attr to headers tags.
  • Added msapplication-TileImage.
  • Added og:site_name.
  • Added profile:first_name, profile:last_name & profile:username props for Arek.
  • Added tags.
  • Added Twitter tags.
  • Added usage of site icon when is no icon – all cases.

2.2.0 (2015-08-19)

  • IMPROVEMENT: added the site icon as og:image for the home page.

2.1.0 (2015-05-21)

  • IMPROVEMENT: added checking site locale with Facebook allowed locale.

2.0.0 (2014-12-11)

  • IMPROVEMENT: added check to post_content exists for CPT without this field.
  • IMPROVEMENT: added og:author link
  • IMPROVEMENT: big refactoring
  • IMPROVEMENT: added filters, see FAQ section

1.0.0 (2014-10-02)

Init.

Try other plugins

Header Footer Code Manager icon

Header Footer Code Manager

4.9 · 600K+ installs

Easily add tracking code snippets, conversion pixels, or other scripts required by third party services for analytics, marketing,…

YITH WooCommerce Wishlist icon

YITH WooCommerce Wishlist

3.9 · 600K+ installs

YITH WooCommerce Wishlist add all Wishlist features to your website. Needs WooCommerce to work. WooCommerce 8.1.x compatible.