Skip to content

Instantly share code, notes, and snippets.

@bavington
Last active February 24, 2016 09:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bavington/be4a01914cf115fbaa3b to your computer and use it in GitHub Desktop.
Save bavington/be4a01914cf115fbaa3b to your computer and use it in GitHub Desktop.
Simple JSON+LD Boilerplate for configuring your Site Name and Google Sitelinks Search Box Schema.
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
// Include your Site name within Google Search Results
"name" : "James' Donuts",
"alternateName" : "James' Donuts Ltd",
"url": "https://www.jamesdonuts.co.uk",
// Enabe the Google Sitelinks Search Box
"potentialAction": {
"@type": "SearchAction",
//Use only one of the following lines
"target": "https://query.example.com/?s={search_term_string}", //WordPress & WooCommerce
"target": "https://query.example.com/catalogsearch/result/?q={search_term_string}", //Magento
"query-input": "required name=search_term_string"
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment