June 29, 2018

Advanced Templates: Open Graph Tags

When you share your posts via social media, the services use the meta data within your post's template to pull data from the post to share, including images, title, and description. If you are using an Advanced Template Set, you will need to add the open graph tags to the Individual Archives Template between the <head> </head> tags.

Facebook Open Graph Tags

<meta property="og:url" content="<$MTEntryPermalink$>" />
<meta property="og:title" content="<$MTPostPageTitle remove_html="1"$>" />
<meta property="og:description" content="<$MTEntryExcerpt$>" />
<MTEntryPhoto><meta property="og:image" content="<$MTEntryPhotoURL spec="220si"$>" /></MTEntryPhoto>

Twitter Open Graph Tags

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@TWITTERHANDLE">
<meta name="twitter:creator" content="@TWITTERHANDLE">
<meta name="twitter:title" content="<$MTEntryTitle$>">
<meta name="twitter:description" content="<$MTEntryExcerpt$>">
<meta name="twitter:image" content="<MTEntryPhoto><$MTEntryPhotoURL spec="600wi"$></MTEntryPhoto>">

Replace TWITTERHANDLE with your Twitter username.

Updated 29 June 2018

Not quite what you are looking for? Check out these other articles:


Need design help?

Looking to launch a new blog? Have an itch to tweak your design or layout? Want a superior banner or design custom made specifically for your blog? We've got you covered!

Discover Typepad Services