How to set custom Open Graph tags

Last update: 06 March, 2018

Yoast SEO includes the option to set custom Facebook images, titles and descriptions on a page by page basis after you have enabled OpenGraph meta data.

Table of Contents

Homepage

WordPress has two options for your homepage: Your latest posts or static. Setting custom Open Graph tags will depend on which option you selected.

Check Homepage Type

  • Log in to your WordPress website. When you're logged in, you will be in your 'Dashboard'. On the left-hand side, you will see a menu. In that menu, click on 'Settings'.
  • The ‘Settings’ menu will expand providing you additional options. Click on 'Reading'
  • The first option is 'Your homepage displays'. Admin > Settings > Reading : Your homepage displays
  • If 'Your latest posts' is selected, follow the steps here.
  • If 'A static page' is selected, follow the steps here.

Homepage Displays Your Latest Posts

  • Log in to your WordPress website. When you're logged in, you will be in your 'Dashboard'. On the left-hand side, you will see a menu. In that menu, click on 'SEO'.
  • The ‘SEO’ settings will expand providing you additional options. Click on 'Social'.
  • Click on the Facebook tab.
  • Enter a custom image, title and description under Frontpage settings.
  • Click 'Save Changes'.

Posts, Pages and other Taxonomies

The social tab of the meta box allows you to set a custom image, title and description on each post, page (including the static front and blog pages) or taxonomy.

Preview

One of the Yoast SEO for WordPress Premium features is the ability to see what your post will look like when sharing on Facebook.

Yoast SEO Metabox : Social Tab - Facebook preview

Available Developer Filters

This guide below is written for advanced users and developers. Looking for a web developer to customize our plugin? We highly recommend checking out Code Poet as they have a great list of available freelance WordPress developers.

There are a number of filters documented in the plugin code for developers to programatically change OpenGraph output. Here are some examples.

Was this article helpful? ·