How to add og-meta to shopify descriptions?

by haylee.mertz , in category: PHP CMS , 25 days ago

How to add og-meta to shopify descriptions?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer


by ryleigh , 24 days ago


To add OG meta tags to Shopify product descriptions, you will need to edit the theme files in your Shopify store. Here's a step-by-step guide on how to do it:

  1. Log in to your Shopify admin dashboard.
  2. Go to Online Store > Themes.
  3. Click on the 'Actions' dropdown menu and select 'Edit code'.
  4. In the left-hand sidebar, find and click on the 'theme.liquid' file under the 'Layout' folder.
  5. Look for the tag in the theme.liquid file, and add the following OG meta tags between the opening and closing tags:
<meta property="og:title" content="{{ product.title }}" />
<meta property="og:description" content="{{ product.description }}" />
<meta property="og:image" content="{{ product.featured_image.src | img_url: '1024x1024' }}" />
<meta property="og:url" content="{{ shop.url }}{{ product.url }}" />
<meta property="og:type" content="product" />

  1. Save the changes you made to the theme.liquid file.
  2. To ensure that the OG meta tags are working correctly, you can use the Facebook Sharing Debugger tool ( to test your product pages.

By following these steps, you should be able to successfully add OG meta tags to your Shopify product descriptions.