Hi all,
I would like to incorporate structured data for company contacts, as per googles instructions here https://support.google.com/webmasters/answer/4620709
To which file do i add that?
TIA!
Hi all,
I would like to incorporate structured data for company contacts, as per googles instructions here https://support.google.com/webmasters/answer/4620709
To which file do i add that?
TIA!
Using the "base" template provided by Google in the link you provided, you could create the file /includes/templates/YOUR_TEMPLATE/jscript/jscript_contact_markup.js that contains:
Code:<script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Organization", "url" : "http://www.your-company-site.com", "contactPoint" : [ { "@type" : "ContactPoint", "telephone" : "+1-401-555-1212", "contactType" : "customer service" } ] } </script>
Thanks to i have to add a link pointing to the js file in any other file?
Nope, all you need is that one file. It will be automatically loaded on each page within your store.
In chrome i don't see it loaded, however a different js file in the same directory does load and i see that file is being referenced in /public_html/includes/templates/YOUR_TEMPLATE/common/html_header.php
PHP Code:
<script src="<?php echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'jscript') . '/site_seal.js' ?>" type="text/javascript"></script>
Try it with the "classic" template (temporarily changing to see); it might be a template issue.
My bad, try naming the file jscript_contact_markup.php and modify the contents to:
Code:<?php ?> <script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Organization", "url" : "http://www.your-company-site.com", "contactPoint" : [ { "@type" : "ContactPoint", "telephone" : "+1-401-555-1212", "contactType" : "customer service" } ] } </script>
Without a link to the site, I can't help further ... except that any "uncaught exception" would be in the Google code example rather than the linking of it into Zen Cart.
Bookmarks