Store Name appearing in Page Titles

Solved
katiesummit1
New Member
4 0 0

Hi there!

I've seen a few posts asking this question, and all are fixed by finding the <title> tag or {{ page_title }}.

However I can't find anything like this in the theme.liquid, only the first line 'if page_title == challenge' which doesn't seem to reference 'store name' anywhere. (I'm actually not sure where that code comes from.

I've pasted code below, would really appreciate some help! (sorry if I haven't pasted correctly, I'm a complete novice with code)

{%- if page_title == 'Challenge' -%}
  {%- assign is_design_mode = true -%}
{%- endif -%}
<!doctype html>
<!--[if IE 9]> <html class="ie9 no-js supports-no-cookies" lang="{{ shop.locale }}"{% if settings.layout_enable_rtl %} dir="rtl"{% endif %}> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js supports-no-cookies" lang="{{ shop.locale }}"{% if settings.layout_enable_rtl %} dir="rtl"{% endif %}> <!--<![endif]-->
{% capture document %}

<script type="text/javascript">
(function() {
    window.sib = {
        equeue: [],
        client_key: "szkdt53skxvjc7sv2va16"
    };
    /* OPTIONAL: email for identify request*/
    // window.sib.email_id = 'example@domain.com';
    window.sendinblue = {};
    for (var j = ['track', 'identify', 'trackLink', 'page'], i = 0; i < j.length; i++) {
    (function(k) {
        window.sendinblue[k] = function() {
            var arg = Array.prototype.slice.call(arguments);
            (window.sib[k] || function() {
                    var t = {};
                    t[k] = arg;
                    window.sib.equeue.push(t);
                })(arg[0], arg[1], arg[2]);
            };
        })(j[i]);
    }
    var n = document.createElement("script"),
        i = document.getElementsByTagName("script")[0];
    n.type = "text/javascript", n.id = "sendinblue-js", n.async = !0, n.src="https://sibautomation.com/sa.js?key=" + window.sib.client_key, i.parentNode.insertBefore(n, i), window.sendinblue.page();
})();
</script>



<head>
  <meta name="google-site-verification" content="Gf2FeItq2UUydaqV8fEPmxZCwubQ15H1WWU5cCRFSIY" />
  <!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-W44PW6K');</script>
<!-- End Google Tag Manager -->
  <meta name="google-site-verification" content="7AxYu4cTuLLbfneWVxL3TLJvnDDZx4jvbvh1TFwh7Bw" />
  {% include 'head' %}
  {%- if settings.layout_include_weglot_app -%}
    {% capture weglot_includes %}
      {% include 'weglot_hreftags' %}
      {% include 'weglot_switcher' %}
    {% endcapture %}
  {%- endif -%}
  {%- if is_design_mode -%}
    
{{ content_for_header }}
    {{ weglot_includes }}
  {%- else -%}
    {% capture get_content_for_header %}    
{{ content_for_header }}
      {{ weglot_includes }}
    {% endcapture %}
  {%- endif -%}
<!--AZEXO_Header_Scripts--> {% include 'azexo-header-scripts' %} <!--End_AZEXO_Header_Scripts--><!--AZEXO_Version_81--></head>

{% include 'globo.formbuilder.scripts' %}
<body{% include 'layout-get-body-attributes' %}>
{%- if settings.layout_enable_preloader -%}
  {% include 'layout-get-preloader' with is_fixed: true %}
{%- endif -%}

{% section 'global-settings' %}
{% section 'header' %}
<main id="MainContent">
  {{ content_for_layout }}{% include 'sectionhub' %}
</main>
{% section 'footer' %}
{% section 'popup' %}
{% section 'footbar' %}
{% include 'fixed-sidebar' %}
{% include 'templates' %}
{% include 'layout-get-includes' %}
{% include 'layout-get-version' %}
{% endcapture %}
{%- if is_design_mode -%}
  {{ document }}
{%- else -%}
  {{ document | replace: '   ', ' ' | replace: '  ', ' ' }}
{%- endif -%}
{% capture get_content_for_header %}
  {%- if settings.dev_enable_content_for_header -%}
    {%- assign get_content_for_header = get_content_for_header | replace: "window.addEventListener('load', asyncLoad, false);", "window.addEventListener('theme.loaded.jquery', asyncLoad, false);" | replace: "window.attachEvent('onload', asyncLoad);", "window.attachEvent('theme.loaded.jquery', asyncLoad);" -%}
    {{ get_content_for_header }}
  {%- endif -%}
  {{ weglot_includes }}
{% endcapture %}
{%- unless is_design_mode -%}
  {{ get_content_for_header | replace: '   ', ' ' | replace: '  ', ' ' }}
{%- endunless -%}
<!--AZEXO_Footer_Scripts--> {% include 'azexo-footer-scripts' %} <!--End_AZEXO_Footer_Scripts--><!-- WPD Start -->
                {% if customer.tags.size > 0 and template != 'cart' %}
                <script>
                    document.addEventListener('DOMContentLoaded', function() {
                      let checkoutbtninterval = setInterval(function(){
                        var x=document.querySelectorAll("input[name='checkout'], button[name='checkout'], input[name='goto_pp'], button[name='goto_pp'], input[name='goto_gc'], button[name='goto_gc'], [href$='checkout']");
                        var WPD_RedirectToCart = function(e) {
                          	e.stopPropagation();
                            e.preventDefault();
                            window.location = '/cart';
                            };
                            for (var i = 0; i < x.length; i++) {
                                x[i].addEventListener('click', WPD_RedirectToCart, false);
                            }
},500)
                });
              </script>
               {% endif %}
         

               {% if customer.tags.size > 0 and template == 'cart' %}
                 {% include 'wcp_cart' %}
               {% endif %}
               <!-- WPD End -->
  {% if canonical_url contains "apps/wpdapp" %}
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <style>
      .wpd_clearfix{ padding-top: 15px; padding: 5px }
      .wpd_submit {  margin-left:10px }
      #website, #taxid, .wpd_create_account, #country {display:none}
      #MainContent{ margin-top: 25px }
      .wpd_headermsg .title {
    text-align: left;        
	}
      .wpd_hide,#city{ display: none}
      input[type="radio"]{
      	min-width: 0% !important;
    	min-height: 0px;
        display:inline !important;
      }
      .wh-ad-custom{ margin-left: 10px}
      
    </style>
    <script>
      //document.querySelector('.wpd_address').innerText = "";
      document.querySelector('.wpd_address2').innerText = "* Suburb";
      //document.querySelector('.wpd_city').innerText = "* State";   
      document.querySelector('.company').innerText = "* Name of Club or School";
      $('#company').insertBefore('#comp_address');
   // var wpd_submit = document.getElementsByClassName("wpd_submit")[0];
    //wpd_submit.classList.add("");
      
          var EIM = document.createElement("div");                
      EIM.innerHTML='<div class="wpd_clearfix wh-ad-custom wpd_hide" id="type-of-sports-container"><label class="wpd_pppc">What type of sports club?</label>'
      +'<select id="type-of-sports">'
      +'<option value="Athletics">Athletics</option>'
      +'<option value="AFL">AFL</option>'
      +'<option value="Basketball">Basketball</option>'
      +'<option value="Cricket">Cricket</option>'
      +'<option value="Netball">Netball</option>'
      +'<option value="Rugby League">Rugby League</option>'
      +'<option value="Rugby Union">Rugby Union</option>'
      +'<option value="Soccer">Soccer</option>'
      +'<option value="Swimming">Swimming</option>'
      +'<option value="Table Tennis">Table Tennis</option>'
      +'<option value="Tennis">Tennis</option>'
      +'<option value="Touch Rugby">Touch Rugby</option>'
      +'<option value="Volleyball">Volleyball</option>'
      +'<option value="Other">Other</option>'
      +'</select>';
      +'</div>';
      //document.getElementsByClassName("wpd_full_with")[0].append(EIM);        
	$(EIM).insertAfter('#email');
      
      
      var EIM = document.createElement("div");                
      EIM.innerHTML='<div class="wpd_clearfix wh-ad-custom wpd_hide" id="type-of-school-container"><label class="wpd_pppc">What type of school?</label>'
      +'<select id="type-of-school">'
      +'<option value="Daycare/Preschool">Daycare/Preschool</option>'      
      +'<option value="High School">High School</option>'
      +'<option value="OSHC">OSHC</option>'
      +'<option value="Primary School">Primary School</option>'
      +'<option value="Special Education">Special Education</option>'
      +'<option value="University/Tafe">University/Tafe</option>'
      +'<option value="Other">Other</option>'
      +'</select>';
      +'</div>';
      //document.getElementsByClassName("wpd_full_with")[0].append(EIM);        
	$(EIM).insertAfter('#email');
      
        //existing customer
      var EIM = document.createElement("div");                
      EIM.innerHTML='<div class="wpd_clearfix wh-ad-custom"><label class="wpd_pppc">I represent a</label>'
      +'<div>'
      +'<p><input type="radio" name="represent" value="school" >School</p>'
      +'<p><input type="radio" name="represent" value="sports club" >Sports Club</p>'
      +'</div>';
      +'</div>';
      //document.getElementsByClassName("wpd_full_with")[0].append(EIM);        
	$(EIM).insertAfter('#email');
            
         
      var wpd_classname = document.getElementsByClassName("wpd_submit");
    var change_note_value = function() {
          var ExtraValue='\\r\\n\\r\\n Represent : '+$('input[name="represent"]:checked').val();
      
      if($('input[name="represent"]:checked').val() == "school" ){
            ExtraValue+='\\r\\n\\r\\n School : '+ $('#type-of-school option:selected').val();
      
      }else if($('input[name="represent"]:checked').val() == "sports club" ){
            ExtraValue+='\\r\\n\\r\\n Sports Club : '+ $('#type-of-sports option:selected').val();
      }    
      	
          document.getElementById("ExtraFields").value=ExtraValue;
    }
        for (var i = 0; i < wpd_classname.length; i++) {
        wpd_classname[i].addEventListener('click', change_note_value, false);
    }
      
      $('input[name="represent"]').on('change',function(){

      var get_val = $(this).val();
//       console.log(get_val);
      if(get_val == "school" ){
      $('#type-of-sports-container').hide();
      $('#type-of-school-container').show();
      }else{
      $('#type-of-school-container').hide();
      $('#type-of-sports-container').show();
      }


      });
    </script>
  {% endif %}
  <script src="{{ 'sectionhub.js' | asset_url }}" defer></script></body>
</html>
0 Likes
KieranR
Shopify Partner
134 10 35

This looks like one possibility:

{% include 'head' %}

Maybe look in your Snippets folder for head.liquid and see what's in there.

A self defined Shopify SEO "expert". Sometimes I freelance outside the 9-5
0 Likes
katiesummit1
New Member
4 0 0

Thank you so much Kieran!

I did try removing the code you suggested, but the website simply disappeared and had black boxes on the page instead.

Next I looked in the snippets and found it there - thanks!

This is the code in head.liquid below... I removed a lot of the'capture seo title' bit so that now it only says:

{%- capture seo_title -%}
{{ page_title }}
{%- endcapture -%}

The titles haven't updated in google search yet, maybe it takes a bit of time?

 

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="{{ settings.color_theme }}">
<link rel="canonical" href="{{ canonical_url }}">
{%- if settings.favicon != blank -%}
    <link rel="shortcut icon" href="{{ settings.favicon | img_url: '32x32' }}" type="image/png">
{%- endif -%}
{%- capture seo_title -%}
    {{ page_title }}
    {%- if current_tags -%}
        {% assign meta_tags = current_tags | join: ', ' %} &ndash; {{ 'general.meta.tags' | t: tags: meta_tags }}
    {%- endif -%}
    {%- if current_page != 1 -%}
        &ndash; {{ 'general.meta.page' | t: page: current_page }}
    {%- endif -%}
   <!-- {%- unless page_title contains shop.name -%}
        &ndash; {{ shop.name }}
    {%- endunless -%}-->
{%- endcapture -%}
{%- if template contains 'gift_card' -%}
    {%- assign formatted_initial_value = gift_card.initial_value | money_without_trailing_zeros: gift_card.currency -%}
    {%- assign formatted_initial_value_stripped = formatted_initial_value | strip_html -%}
    <title>{{ 'gift_cards.issued.title' | t: value: formatted_initial_value_stripped, shop: shop.name }}</title>
    <meta name="description" content="{{ 'gift_cards.issued.subtext' | t }}">
{%- else -%}
    <title>{{ seo_title }}</title>
    {%- if page_description -%}
        <meta name="description" content="{{ page_description | escape }}">
    {%- endif -%}
{%- endif -%}
{% include 'head-get-social-meta-tags' %}
{% include 'css-bootstrap' %}
{% include 'css-start-styles' %}
{% include 'js-loader' %}
<script>
    window.page = { default: {} };
</script>

 

0 Likes
KieranR
Shopify Partner
134 10 35

This is an accepted solution.

Yeah google will take some time to recrawl and update their index. 

Easy way to check is by looking at the page titles in here:

KieranR_0-1613003785406.png

Or at scale, you can get ScreamingFrog (desktop app) and crawl the first 500 URLs free to see what the titles are. 

Glad it worked though! But yeah gotta be careful with live theme changes, plenty can go wrong. Always backup before changing anything, look at Shopify's file rollback feature - its pretty handy too.

 

 

A self defined Shopify SEO "expert". Sometimes I freelance outside the 9-5
0 Likes
katiesummit1
New Member
4 0 0

I did a crawl with screaming frog and they are appearing correctly, thanks so much for all your help, much appreciated!!

0 Likes