View Single Post
Old 01-07-2019, 02:50 PM
elmirage001 elmirage001 is offline

Join Date: Apr 2007
Posts: 1,853

Default JSON-LD <script type="application/ld+json"> Question

One of my static pages is ranking really well and we receive a large amount of traffic from this page. Recently we dropped from #2 to #5 so I'm trying to add JSON-LD structured data to this static page.

My issue is that while the structured data validates fine with the Google Structured Data Testing Tool, the testing tool can not not find it on the page. I moved it from the <body> to the <head> section but it's still not working and then I saw when using View Source that the <script type="application/ld+json"> changed to <script type="text/javascript"> so maybe that's why Google is not seeing it.

Does anyone know how to stop <script type="application/ld+json"> from changing to <script type="text/javascript"> when x-cart publishes a static page?

.tpl code
{literal} <script type="application/ld+json"> { "@context" : "", "@type" : "Article", .blah .blah .blah } </script> {/literal}
HTML source

<script type="text/javascript">{"@context":"","@type":"Article","headline": </head>
Thanks! Paul
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template | Live
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template | Dev
  • Performive Hosting | Linux | PHP v7.4.15 | MySQL v5.7.33 |
Reply With Quote