Edit HTML Code

Solved
Tourist
12 0 2

Hello everyone, 

 

I'm trying to resolve some issues (SEO errors) in my site's html code for instance this specific page https://color-diamonds.net have some errors as described in the attached screenshots, however when I go to my theme.liquid I can't find this specific page source code, (or any other page code for this matter including product.liquid & page.liquid)

It is visible when I go to the mentioned webpage and right click on the mouse and then choose either show page source or inspect element but I need to be able to edit it and save the changes on the server.

Can someone please guide me through? Any assistance will be highly appreciated. 

 

Thanking you in advance, 

 

Edmond

 

Screen Shot 2019-07-11 at 12.15.45.pngScreen Shot 2019-07-11 at 12.16.05.pngScreen Shot 2019-07-11 at 12.16.22.pngScreen Shot 2019-07-14 at 12.07.52.pngScreen Shot 2019-07-14 at 12.08.28.png

0 Likes

Success.

Shopify Partner
239 59 69

Hey @ColorDiamondNet,

 

I understand that you're getting duplicate title tags. You'd like to edit your site's html code to remove errors that you're getting in Bing webmaster.

 

I may be able to help you. Try this:

 

Before you customize your theme:

  • Duplicate your theme to create a backup copy. This makes it easy to discard your changes and start again if you need to.

 

Note: Do NOT modify any code between these tags:

<!-- SEO - All in One -->

<!-- End - SEO - All in One -->

 

Here's how to edit your theme files and remove the code:

  1. From your Shopify admin, go to Online Store > Themes.
  2. Click Actions > Edit code.
    • The code editor shows a directory of theme files on the left, and a space to view and edit the files on the right.
    • When you click a file in the directory on the left, it opens in the code editor.
  3. Click theme.liquid in your Layout directory.
  4. Find the line of code that looks similar this:
    <title> Other code is here between the title tags... </title>
  5. Modify the code to look like this (notice that you are simply adding code just before and after the title tag):
    <!--
    <title> Other code is here between the title tags... </title>
    -->
  6. Click Save.

 

Let me know if this answers your question or if you need further help!

Brian | Shopify Partner | Ecommerce Consultant
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution  
 - Need further assistance? Visit www.BrianAtWork.com

0 Likes
Tourist
12 0 2
 
First of all I would like to thank you for takin g the time and address to my post.
As for your suggestion If you'll be kind enough and take another look at my post you'll be able to see that I have uploaded a few screenshots couple of them are shots off the inspect element / page source code. 
basically I'm saying that for some reason the page source code and the theme.liquid code do not match! It's like some of the code is missing in the theme.liquid file. The only way that I can see the errors is when I right click on the mouse and view the page source code. The theme.liquid code is much shorter then the page source code.
I'm attaching a screenshots of the complete theme.liquid code which was never been edited or modified.
Looking forward hearing from you again.
 
Thanking you in advance, 
 
Edmond.
 
 
Screen Shot 2019-07-15 at 10.29.50.pngScreen Shot 2019-07-15 at 10.30.10.pngScreen Shot 2019-07-15 at 10.30.39.pngScreen Shot 2019-07-15 at 10.31.00.pngScreen Shot 2019-07-15 at 10.31.25.pngScreen Shot 2019-07-15 at 10.31.50.png theme.liquid  file (this is the original file I have never edit it or modified it in any way), I'm pretty sure that you'll be able to see the difference between those two.
 
 
0 Likes

Success.

Shopify Partner
239 59 69

Hi Edmond,

 

I did see your screenshots and understand exactly why you are getting the error. The instructions that I gave you will fix the problem.

 

Shopify uses the theme.liquid file to dynamically generate the code that you see in the "inspect element / page source code". The reason why the theme.liquid file appears shorter, is because extra code gets inserted into the theme using an "include" liquid theme tag.

 

In your theme.liquid file, see this code on line 9:

{% include 'SEO-All-in-one' %}

 

When you inspect the code in your browser, this is what you will see instead of the include tag:

<!-- SEO - All in One -->
<title>Natural Loose Fancy Color Diamonds &amp; Colored Diamonds Jewelry</title>
<meta name="description" content="We specialise in all natural fancy color diamonds, loose colored diamonds, color diamonds jewelry, Argyle Pink &amp; Blue diamonds, all 100% natural gia certified."> 
<meta name="robots" content="index"> 
<meta name="robots" content="follow">

 
<script type="text/javascript" async="" src="https://static.whatshelp.io/widget-send-button/js/init.js"></script><script type="text/javascript" async="" src="https://omnisrc.com/inshop/launcher.js?v=2019-07-15T12"></script><script type="text/javascript" async="" src="https://a-60567552.cdn.ns8ds.com/web?t=434220"></script><script type="text/javascript" async="" src="https://cdn.shopifycloud.com/messenger_commerce/assets/new_message_us?version=1558422106&amp;page_id=870388603024974&amp;color=blue&amp;size=large&amp;position_horizontal=right&amp;position_vertical=bottom&amp;messenger_app_id=1163199097047119&amp;shop=123456-48.myshopify.com"></script><script type="text/javascript" async="" src="https://omnisrc.com/inShop/Embed/shopify.js?shop=123456-48.myshopify.com"></script><script type="text/javascript" async="" src="//static2.nexusmedia-ua.com/easymessengerlivechat/externals/js/easybot.js?shop=123456-48.myshopify.com"></script><script type="text/javascript" async="" src="https://whatshelp.io/shopify/widget/7179295.js?v=1544904528&amp;shop=123456-48.myshopify.com"></script><script type="text/javascript" async="" src="https://cdn.shopify.com/s/files/1/2233/5399/t/1/assets/trust_hero_7179295.js?15610583680488354418&amp;shop=123456-48.myshopify.com"></script><script type="text/javascript" async="" src="https://error404.atomseo.com/scripts/shopify-404-real-time-monitoring.js?shop=123456-48.myshopify.com"></script><script type="text/javascript" async="" src="https://s3.amazonaws.com/verge-shopify/verge-json-ld.js?shop=123456-48.myshopify.com"></script><script type="text/javascript" async="" src="https://api.gator.io/v1/analytics/script/60567552?name=latestVisitors&amp;shop=123456-48.myshopify.com"></script><script type="text/javascript" async="" src="//productreviews.shopifycdn.com/assets/v4/spr.js?shop=123456-48.myshopify.com"></script><script type="text/javascript" async="" src="https://www.googleadservices.com/pagead/conversion_async.js"></script><script async="" src="https://www.google-analytics.com/analytics.js"></script><script src="https://connect.facebook.net/signals/plugins/inferredEvents.js?v=2.8.51" async=""></script><script src="https://connect.facebook.net/signals/config/501199760223921?v=2.8.51&amp;r=stable" async=""></script><script async="" src="https://connect.facebook.net/en_US/fbevents.js"></script><script type="text/javascript" async="" src="https://cdn.shopify.com/s/javascripts/tricorder/trekkie.storefront.min.js?v=2017.09.05.1"></script><script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script><script type="application/ld+json">
{
	"@context": "http://schema.org",
	"@type": "Organization",
	"url": "http://color-diamonds.net"}
</script>

<script type="application/ld+json">
{
  "@context": "http://www.schema.org",
  "@type": "Store","name": "ColorDiamondsNet","url": "https://color-diamonds.net","description": "We specialise in all natural fancy color diamonds, loose colored diamonds, color diamonds jewelry, Argyle Pink & Blue diamonds, all 100% natural gia certified.","priceRange":"0-500"
,"telephone": "+972-50-211-2221","address": {
    "@type": "PostalAddress","streetAddress": "AddressDrop","addressLocality": "Ramat Gan","addressRegion": "","postalCode": "52521","addressCountry": "Israel"},"geo": {
    "@type": "GeoCoordinates",
    "latitude": "",
    "longitude": ""
  }}
</script> 
<script type="application/ld+json">
{
   "@context": "http://schema.org",
   "@type": "WebSite",
   "url": "https://color-diamonds.net/",
   "potentialAction": {
     "@type": "SearchAction",
     "target": "https://color-diamonds.net/search?q={search_term_string}",
     "query-input": "required name=search_term_string"
   }
}
</script> 
<!-- End - SEO - All in One -->

 

That little include tag in your code generates 37 lines of additional code that are only visible when viewing your store in a web browser.

 

You can see the extra inserted code when inspecting the code in your browser, but you can't see it in Shopify Admin.

 

Even though you have never manually edited it, your theme.liquid was modified by the SEO All-in-one app to get that include tag in there. This include tag is what is causing the problems. If you want to continue using the SEO All-in-one app, then you need to follow my suggestions on how to get rid of the title tag error. Otherwise, you must uninstall the app and make sure that the include tag is removed from your theme.liquid file (you may have to remove it manually if app uninstall process does not).

 

Does this all make sense? Go ahead and follow my instructions and see if it works.

 

Also, I see that you have several other errors in your code:

Screen Shot 2019-07-15 at 7.22.36 AM.png

 

You may need some professional help with this. I'll private message my email address to you in case you'd like to hire me to fix these errors for you. You may also hire help using the Shopify Experts Marketplace.

 

Cheers! 🎉

Brian | Shopify Partner | Ecommerce Consultant
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution  
 - Need further assistance? Visit www.BrianAtWork.com

0 Likes
Tourist
12 0 2

Hi Brian, 

 

once again thank you so much for the prompt response. 

Your explanation makes a perfect sense, to be honest I was suspecting that there is a dynamic code but i wasn't sure though.

I have decided to remove the app and it solved the title issue. 

I'm well aware to the fact that my site has numerous issues, I would like to try and resolve them by my self (I have copied and save the original code)

in case that it won't work out will definitely shoot you an email.

Once again, thank you so much for your time & insights I really appreciate it.

 

All the best, 

 

Edmond.

1 Like
Tourist
12 0 2

Hi Brian, 

 

did I manage to accept the right solution?

 

Edmond. 

0 Likes
Shopify Partner
239 59 69

Edmond, indeed you did. Thank you and good luck!

Brian | Shopify Partner | Ecommerce Consultant
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution  
 - Need further assistance? Visit www.BrianAtWork.com

0 Likes
Highlighted
Excursionist
19 0 2

Hi @BrianAtWork , I'm a newbie here. I use Minimal theme and got similar errors complained by Bing SEO analyzer. I read your suggestion but do not quite follow your 2nd explanation. I attached my theme.liquid screenshot, would you be so kind to see if your recommendation, which seems like commenting out the <tittle> tag, would work for my theme? Thank you so much in advance for your help. MinimalTheme_liquid.jpg

0 Likes
Shopify Partner
239 59 69

Hi @altCookinghub,

 

I've sent you a private message. Let me know if you have any questions or concerns!

 

Cheers!

Brian | Shopify Partner | Ecommerce Consultant
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution  
 - Need further assistance? Visit www.BrianAtWork.com

0 Likes