The code above would annotate my Knowledge Graph box (if I ever reach such levels of stardom) with my social profiles directly in the SERP.
To get this to appear, the syntax of the code in the Custom HTML Tag needs to look like this:
Here, I provide the URL and the necessary search query parameter that operate the internal site search engine on my site. Now, if someone were to enter a search term directly in the SERP sitelinks, they will be transported to the search results page within my site for that particular query.
Enable sitelinks search box
This, I think, is one of the coolest additions to the SERP. On some sites, you can see a search box directly in the sitelinks. This search box is tied together with the internal search engine of the site, allowing you to directly search for content within the site!To get this to appear, the syntax of the code in the Custom HTML Tag needs to look like this:
1
2
3
4
5
6
7
8
9
10
11
|
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "http://www.simoahava.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "http://www.simoahava.com/?s={search_term}",
"query-input": "required name=search_term" }
}
</script>
|
Things to note
Remember that you can combine your various types of structured data into a Custom HTML Tag, and you should do so to reduce the number of tags in your container. The two examples from above would be combined into a single structured data push like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
<script type="application/ld+json">
[{
"@context" : "http://schema.org",
"@type" : "Person",
"url" : "http://www.simoahava.com/",
"name" : "Simo Ahava",
"sameAs" : [ "http://fi.linkedin.com/in/simoahava",
"http://plus.google.com/+SimoAhava",
"http://www.twitter.com/SimoAhava" ]
},
{
"@context": "http://schema.org",
"@type": "WebSite",
"url": "http://www.simoahava.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "http://www.simoahava.com/?s={search_term}",
"query-input": "required name=search_term" }
}]
</script>
|