Title / meta Description aren't showing on any page on my site

Topic summary

A Shopify store owner reports that page titles and meta descriptions no longer display what’s entered in the Shopify backend. Instead, all titles have been changed to ‘American Express’ and descriptions show reversed/encoded text (“sit sknahT” and URLs like “moc.ahctamoknek”).

Attempted Solutions:

  • SpellnSell suggested adding specific code to theme.liquid under the <head> tag, which partially fixed the issue for most pages but not the homepage.

  • Dan-From-Ryviu recommended restoring a previous theme version through the theme editor’s “Recent changes” backup feature.

  • SpellnSell then provided more comprehensive code to replace the existing <title> tag, including conditional logic for page_title, page_description, and Open Graph meta tags.

Current Status:
The issue appears to stem from malicious or corrupted code in the theme files. The homepage title/description remains unresolved despite initial fixes. The conversation includes code snippets (some appearing reversed/encoded) for implementing proper meta tag handling in theme.liquid.

Summarized with AI on November 8. AI used: claude-sonnet-4-5-20250929.

All my page Titles and Meta descriptions have been edited in my shopify source code - so no longer display what I enter in shopify backend.

I am unsure what to edit in the theme code to remove these. The Meta Descriptions have been deleted sitewide, and Page Title has been set to ‘American Express’.

I am unsure where to edit this in the shopify source code so that it reverts to what I enter in the shopify backend

Site is https://kenkomatcha.com/

Thanks

Open your theme code editor and search for theme.liquid

then add this just under your tag


  
  
  {{ content_for_header }}
  
  
  
  
  

Hi @Anonymous

You can solve this issue by backup the previous version of your theme.liquid. Please follow these steps to do that.

Thanks @SpellnSell - it seems to have fixed it for all but the home page

I do see the shop name in homepage, what do you want to show ?

I can’t get the Title or Meta description in the Shopify backend to show up, it is just showing the Store name

Ah I see - ok can you try this:

If you have a remove it and replace with the one below.


  {% if page_description %}
    
  {% else %}
    
  {% endif %}

  {%- liquid
    assign og_title = page_title | default: shop.name
    assign og_url = canonical_url | default: shop.url
    assign og_type = 'website'
    assign og_description = page_description | default: shop.description | default: shop.name
  
    if request.page_type == 'product'
      assign og_type = 'product'
    elsif request.page_type == 'article'
      assign og_type = 'article'
    elsif request.page_type == 'collection'
      assign og_type = 'product.group'
    elsif request.page_type == 'password'
      assign og_url = shop.url
    endif
  -%}
  
  
  
  
  
  
  
  {%- if page_image -%}
    
    
    
    
  {%- endif -%}
  
  {%- if request.page_type == 'product' -%}
    
    
  {%- endif -%}
  
  {%- if settings.social_twitter_link != blank -%}
    
  {%- endif -%}