Theme.Liquid Coding Help Needed (TROUBLESHOOT)

Hi,

I’m trying to update the meta page title of my Shopify Store so that it displays in this format below.

Page Name | Site Name

My current theme.liquid code shows the following.

{{ page_title }} {%- if current_tags %} – tagged "{{ current_tags | join: ', ' }}"{% endif -%} {%- if current_page != 1 %} – Page {{ current_page }}{% endif -%} {%- unless page_title contains shop.name %} – {{ shop.name }}{% endunless -%}

Can someone please help me out?

Thank you very much!

1 Like

Hello @RedCatX

Sure! You’re already very close to the format you want:

Page Name | Site Name

You just need to change the separator and make sure it’s consistently using a pipe (|) instead of –.

Here’s the updated version of your tag in theme.liquid:


Replaced – with | for cleaner SEO formatting.

Ensures Page Name | Site Name format unless the title already includes the shop name.Here’s the updated version of your tag in theme.liquid:

Thank you very much! :smiling_face_with_sunglasses:

1 Like

Hello @RedCatX
Thank you for getting back to me. I’m happy to hear that it worked for you. Should you need any further help, please don’t hesitate to reach out. If you found the post helpful, kindly consider giving it a like.