Why is my SEO check still failing after I added a meta description in my Shopify settings?

This can happen when there is no title code inside your theme. You can add a title to the theme by following the directions below.

Verify that there is no meta description

  1. View your website
  2. Right click and select ‘View Page Source’
  3. Type Control+F (Command+F on a Mac) to open the search box
  4. Search for <title> in the file to find the different titles in your theme
  5. You should see that zero results appear

Create a meta description snippet file

  1. View your themes in Shopify
  2. Select ‘Actions’ and  ‘Edit code’ for your live theme
  3. Go the the ‘Snippets’ folder
  4. Click ‘Add a new snippet’
  5. Call it 'meta'
  6. Create snippet
  7. Add the following piece of code to the new snippet file
<!-- meta.liquid snippet  -->
{% assign maxwords = 30 %}
   {% if template contains 'product' %}
     <meta name="description" content="{{ product.description | strip_html | strip_newlines | truncatewords: maxwords | escape }}" />
    {% elsif template contains 'page' %}
      <meta name="description" content="{{ page.content | strip_html | strip_newlines | truncatewords: maxwords | escape }}" />
    {% elsif template == 'index' %}
      {% if shop.description != '' %}
       <meta name="description" content="{{ shop.description }}" />
      {% endif %}
    {% endif %}

 

Add the meta description to the theme

  1. Open the theme.liquid file
  2. Add the following piece of code between the <head></head> tags
{% include 'meta' %}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us