Last active
February 8, 2018 17:45
-
-
Save freakdesign/5d81d97639b5b739f12e to your computer and use it in GitHub Desktop.
Google Sitelinks Search Box for Shopify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if template == 'index' %} | |
{% comment %} | |
<!-- | |
Sitelinks Search Box Copy and Paste code for Shopify by Freakdesign.com.au | |
https://developers.google.com/webmasters/structured-data/slsb-overview | |
How to use: Paste this into theme.liquid | |
--> | |
{% endcomment %} | |
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "WebSite", | |
"url": "{{ shop.url }}", | |
"potentialAction": { | |
"@type": "SearchAction", | |
"target": "{{ shop.url }}/search?q={search_term_string}", | |
"query-input": "required name=search_term_string" | |
} | |
} | |
</script> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well I have pasted this code, Does it work instantly or it takes time?