How can I add different meta open graphs for homepage and single product pages?
Meta tags can be added to a cms_index_index.xml
layout file the same way as you added them to the default_head_block.xml
file and they will then only apply on the homepage.
Example -
default_head_block.xml -
<head>
<meta property="og:image" content="http://example.com/DEFAULTIMAGE.png" />
</head>
cms_index_index.xml -
<head>
<meta property="og:image" content="http://example.com/HOMEPAGEIMAGE.png" />
</head>
Will result in the og:image
property being DEFAULTIMAGE.png
on every page without an image explicitly set, and HOMEPAGEIMAGE.png
on the home page.