Skip to content

Instantly share code, notes, and snippets.

@jameswomack
Created December 15, 2017 13:23
Show Gist options
  • Select an option

  • Save jameswomack/d2c28945b07914da2465a25e46d9bf65 to your computer and use it in GitHub Desktop.

Select an option

Save jameswomack/d2c28945b07914da2465a25e46d9bf65 to your computer and use it in GitHub Desktop.
Example implementation of the Schema.org spec for Google/Bing to display a search bar to users to search our site from within Google
<!-- Schema.org spec for Google/Bing to display a search bar to users to search our site from within Google -->
<!-- See: https://developers.google.com/webmasters/structured-data/slsb-overview -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "http://www.showtimeanytime.com",
"potentialAction": {
"@type": "SearchAction",
"target": "http://www.showtimeanytime.com/#search/{search_term_string}",
"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