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

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

Not applicable

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

Replies 6 (6)

SpellnSell
Shopify Expert
13 0 1

Open your theme code editor and search for theme.liquid

 

then add this just under your <head> tag

 

 

  <meta name="description" content="{% if template == 'product' %}{{ product.description | strip_html | truncate: 160 }}{% elsif template == 'collection' %}{{ collection.description | strip_html | truncate: 160 }}{% elsif template == 'page' %}{{ page.description | strip_html | truncate: 160 }}{% elsif template == 'blog' %}{{ blog.description | strip_html | truncate: 160 }}{% else %}Default store description{% endif %}">
  <meta name="keywords" content="{% if template == 'product' %}{{ product.tags | join: ', ' }}{% else %}default, keywords, here{% endif %}">
  <title>{% if template == 'product' %}{{ product.title }}{% elsif template == 'collection' %}{{ collection.title }}{% elsif template == 'page' %}{{ page.title }}{% elsif template == 'blog' %}{{ blog.title }}{% else %}{{ shop.name }}{% endif %}</title>
  {{ content_for_header }}
  <!-- Any additional meta tags -->
  <meta property="og:title" content="{% if template == 'product' %}{{ product.title }}{% else %}{{ shop.name }}{% endif %}">
  <meta property="og:description" content="{% if template == 'product' %}{{ product.description | strip_html | truncate: 160 }}{% else %}Default store description{% endif %}">
  <meta property="og:image" content="{% if template == 'product' %}{{ product.featured_image | img_url: 'large' }}{% else %}URL to your default image{% endif %}">
  <meta property="og:url" content="{{ canonical_url }}">

 

 

Need help with your Shopify store? Check Spell&Sell
Not applicable

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

SpellnSell
Shopify Expert
13 0 1

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

Need help with your Shopify store? Check Spell&Sell
Not applicable

I can't get the Title or Meta description in the Shopify backend to show up, it is just showing the Store nameScreenshot 2024-06-11 at 9.33.18 pm.png

SpellnSell
Shopify Expert
13 0 1

Ah I see - ok can you try this:

 

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

 

  <title>{{ seo_title }}</title>

  {% if page_description %}
    <meta name="description" content="{{ page_description | escape }}">
  {% else %}
    <meta name="description" content="{{ shop.description | escape }}">
  {% 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
  -%}
  
  <meta property="og:site_name" content="{{ shop.name }}">
  <meta property="og:url" content="{{ og_url }}">
  <meta property="og:title" content="{{ og_title | escape }}">
  <meta property="og:type" content="{{ og_type }}">
  <meta property="og:description" content="{{ og_description | escape }}">
  
  {%- if page_image -%}
    <meta property="og:image" content="http:{{ page_image | img_url: 'master' }}">
    <meta property="og:image:secure_url" content="https:{{ page_image | img_url: 'master' }}">
    <meta property="og:image:width" content="{{ page_image.width }}">
    <meta property="og:image:height" content="{{ page_image.height }}">
  {%- endif -%}
  
  {%- if request.page_type == 'product' -%}
    <meta property="og:price:amount" content="{{ product.selected_or_first_available_variant.price | money_without_currency | strip_html }}">
    <meta property="og:price:currency" content="{{ cart.currency.iso_code }}">
  {%- endif -%}
  
  {%- if settings.social_twitter_link != blank -%}
    <meta name="twitter:site" content="{{ settings.social_twitter_link | split: 'twitter.com/' | last | prepend: '@' }}">
  {%- endif -%}
  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:title" content="{{ og_title | escape }}">
  <meta name="twitter:description" content="{{ og_description | escape }}">

 

Need help with your Shopify store? Check Spell&Sell

Dan-From-Ryviu
Shopify Partner
8383 1650 1663

Hi @Anonymous 

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

  • Open Online Store > Themes
  • In the current theme, click "..." > Edit code
  • Open theme.liquid file
  • Below Recent changes, choose a version before you got the issueScreenshot 2024-06-11 at 15.40.51.png
  • Click Save button. Check your store. 

 

- Helpful? Like and Accept solution to let me know or Buy me Coffee ❤️!
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Enjoy 1 month of Shopify for $1. Sign up now.