Documentation / Tutorials / Awesome Enterprise

OG and Twitter tags for Apps that contain its own layout

/ Awesome Enterprise / OG and Twitter tags for Apps that contain its own layout

Go to App -> Config – > Layout

In <head> </head> tag, add below code to include OG and Twitter tag in page

Note- Change awesome code with respect to your page data structure to get data 

//** OG tags **//

<meta property="og:image" content="[aw2.get page.meta._yoast_wpseo_opengraph-image default='{page.featured_image_url size="full"}' /]" />
<meta property="og:title" content="[aw2.get page.meta._yoast_wpseo_opengraph-title default='{page.post_title}' /]" />
<meta property="og:description" content="[aw2.get page.meta._yoast_wpseo_opengraph-description default='{page.meta.description}' /]" />

//** Twitter Tags **//

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="[aw2.get page.meta._yoast_wpseo_twitter-image default='{page.featured_image_url size="full"}' /]" />
<meta name="twitter:title" content="[aw2.get page.meta._yoast_wpseo_twitter-title default='{page.post_title}' /]" />
<meta name="twitter:description" content="[aw2.get page.meta._yoast_wpseo_twitter-description default='page.meta.description}' /]" />

 

Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *