WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Open Graph WP implementation

Implements the Open Graph Protocol on a WordPress installation. Can be used by other plugins as a dependency.

How to override opengraph metadata?

You can add/edit meta data by using 2 actions 'open_graph_head_pre' and 'open_graph_head_post'. 'open_graph_head_pre' executes before the setup takes place. 'open_graph_head_post' executes after the setup but before echoing meta data. I'll add more functions for editing in later versions.

How to override default image of the plugin?

  • Use the add_action('open_graph_head_pre','my_function') .
  • In my_function grab an instance $og = open_graph_instance(); and call $og->set_default_img( $url );
  • Also you can use 'open_graph_head_post' action and $og->set_og_data( 'og:image' => $url ) but this will over ride for all pages/ posts etc

How to override default type of homepage?

  • Use the add_action('open_graph_head_pre','my_function') .
  • In my_function grab an instance $og = open_graph_instance(); and call $og->set_home_type( $type );
  • Also you can use 'open_graph_head_post' action and if(is_home()) { $og->set_og_data( 'og:type' => $type );}

Requires: 3.1 or higher
Compatible up to: 3.1.4
Last Updated: 2011-3-10
Downloads: 4,883

Ratings

4 stars
4.3 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2
0,1,0
0,1,0