Add Facebook Open Graph Tags To WordPress

Facebook Shop

When a link is shared on Facebook it will be crawled to get the page title and description. The way Facebook will get this information is to search for Open Graph tags, these are meta tags added to your page with a title, description and image data. This data is then used to populate the Facebook status box when someone shares your link.

WordPress doesn’t come with the functionality to add Facebook open graph meta tags, but you can use the below snippet to add open graph meta tags to all your posts.

Simply add the following code to your functions.php page and it will automatically create the Facebook open graph tags for you, so no need to have the Facebook plugins on your WordPress site.


Leave a reply