Skip to content

Instantly share code, notes, and snippets.

@craigcooperxyz
Created July 31, 2017 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craigcooperxyz/a9c5ee2a6fea34f85304b122c1b9151b to your computer and use it in GitHub Desktop.
Save craigcooperxyz/a9c5ee2a6fea34f85304b122c1b9151b to your computer and use it in GitHub Desktop.
Better Shopify Titles
<title>
{% if template == 'index' %}
{% if page_title contains 'Welcome' %}
{{ shop.name }} &ndash; Welcome
{% else %}
{{ page_title }}
{% endif %}
{% elsif template == '404' %}
Page Not Found
{% elsif page_title contains shop.name %}
{{ page_title }}
{% else %}
{% if current_tags %}
{{ current_tags.first | capitalise | replace: '-', ' ' }} &ndash;
{% endif %}
{{ page_title }} &ndash; {{ shop.name }}
{% endif %}
</title>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment