How to alter specific page tab titles on my site?

Hello Shopify community,

I am trying to change the tab title for a specific page. I have gone through many of the help articles already and have not found a solution. I know that you can go to “Shopify Admin>Online Store>Preferences>homepage title” to change the tab title for the general website. I also saw that the tab title should be pulled from the SEO title for the collection that is displayed for a specific page. That does not work either.

The home page tab title looks like this →

Capture.PNG

The “all products” page looks like this →

Capture.PNG

As you can see, the current tab title is taking a title, “Products Archive” and concatenating it with our store name “American Hat Makers”. This is ok, but I would like to change “Products Archive” to something else. But I can’t find anywhere where I can edit this, let alone even find where this text exists.

Any help would be Amazing!
Thank you,

Austin

Hi @atg2000 ,

Please go to layout > theme.liquid file, find ‘page_title’ and change code here:

Code:

{%- if page_title == 'Products Archive' -%}
        
      {%- else -%}
        {{ page_title }}
      {%- endif -%}

Hope it helps!

1 Like

Hello LitExtension,

I actually figured out that it was an problem with Yoast SEO and one of their tools was setting that page title to the “Product Archive”. But I did go back and check your solution. I changed the code accordingly with the original settings in Yoast, and your solution did work. Thank you so much for the help:)

1 Like

Is it possible to use this area of code to cycle between a custom title (like emojis or Cart count to get a customer’s attention) and the default code that’s there?