-
This is the official code from Google for the Implementation of a sitelinks searchbox
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "WebSite", "url": "https://www.example.com/", "potentialAction": { "@type": "SearchAction", "target": "https://query.example.com/search?q={search_term_string}", "query-input": "required name=search_term_string" } } </script>
Where
search_term_string
should be the attr name of the query input. So in WP it would normally bes
.RankMaths Code produces this:
<script type="application/ld+json">{ "@context": "https:\/\/schema.org" , "@type": "WebSite" , "@id": "https:\/\/www.domain.com\/#website" , "url": "https:\/\/www.domain.com" , "name": "Website Name" , "potentialAction": { "@type": "SearchAction" , "target": "https:\/\/www.domain.com\/?s={search_term_string}" , "query-input": "required name=search_term_string" } }</script>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The ticket ‘sitelinks searchbox wrong output’ is closed to new replies.