Hi Community,
I am facing a problem that my product page H1 is appearing in OG:title in source code. I want my SEO title and OG:title same what should I do to fix it, I had also seen it from code level but unable to fix this issue. Can anyone please help me in this regards?
reference page: https://chiltanpure.com/products/vitamin-c-serum
Hi @usmekhan91 ,
If you want to ensure that the Open Graph title (og:title) matches your SEO title for a product, you need to replace the current og:title content with the page_title variable that holds your SEO title.
Here’s how you can do that:
- Access your Shopify Admin panel.
- Click on “Online Store” and then on “Themes.”
- Locate your active theme, click on “…,” and then select “Edit code.”
- Search for the file in your theme that contains the Open Graph meta tags. Typically, this might be the theme.liquid file, or it could be contained within a snippet file like social-meta-tags.liquid or head.liquid.
- Find the og:title meta tag. It will look something like this:
- Replace {{ product.title `}} with {{ page_title }} so it should now look like:
- Save the changes to your code.
This will set the Open Graph title to use the SEO title that is normally displayed on the browser tab for that page. Remember to always backup your theme before making changes, and if you’re not comfortable with editing theme code, you might want to consider reaching out to a professional for help.