A space to discuss online store customization, theme development, and Liquid templating.
When I share the url of the website https://allin-israel.co.il on whatsapp, I get on the first line the name of the shop.
Can I change, by code ( Editing the meta title ) so when I will could manually change it from the business name to whatever I would like to?
Hi UriWebfusion,
The previews that you see on platforms like WhatsApp (or Facebook, Twitter, etc) are pulling information from OG tags - and specifically the og:title
property is what is being accessed for the title of the site preview. The values of these are typically defined in the theme (sometimes there's a Liquid snippet specifically for this, like on Dawn's metatags snippet here).
If you want to change this you could replace the value of the content property that defines the "og:title". EG if your theme follows the same pattern as Dawn, this would involve changing `{{ shop.name }}` in `<meta property="og:title" content="{{ shop.name }}" />` to: `<meta property="og:title" content="Your Desired Title" />`.
I'd recommend rather than hardcoding in a new title, you should instead use a metafield under the shop resource.
For example, you might have a metafield with a namespace of `seo` and a key of `og_title`.
Once you've defined and set this metafield, you can reference its value in your theme's code like this: `<meta property="og:title" content="{{ shop.metafields.seo.og_title }}" />`
This liquid code will output the value of the `og_title` metafield in the `seo` namespace for your shop object.
Hope this helps and there's more info on how to work with og tags here,
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog