Adding Open Graph Tags

Open Graph Tags are automatically enabled for all public, non-VIP blogs on WordPress.com. Open Graph tags make it easier for you to control what information Facebook, Google+, and other services display when users share posts from your site. VIP sites are excluded as many existing themes already have custom code that handles these tags. This functionality also enables additional Twitter Card-related metadata.

To enable Open Graph tags, add the following helper function to your functions.php and the tags will be auto-generated for you.

wpcom_vip_enable_opengraph();

The code that generates the tags can be found in Jetpack.

If you’d like to fine-tune the output of the tags, you can filter jetpack_open_graph_tags and modify the array that’s passed in. Find some examples on the Jetpack blog.

Ready to get started?

Tell us about your needs

Let us lead the way. We’ll help you select a top tier development partner. We’ll train your developers, operations, infrastructure, and editorial teams. We’ll coarchitect your deployment processes. We will provide live support for peak events. We’ll help your people avoid dark alleys and blind corners, and reduce wasted cycles.