New Google's Sitelinks Search Box Addon

Daniel-SP

Well-known member
Hello,

Google has just released search boxes for sites and It would be awesome to have this on our forum.

https://developers.google.com/webmasters/richsnippets/sitelinkssearch

I know this could be manually inserted but an addon with options to fill the boxes is always better.

guiltyDogVideo.png
 
Last edited:
For now, if any want's to implement it.
Add this code on PAGE_CONTAINER template below footer area.
Code:
<xen:if is="{$contentTemplate} == 'forum_list'">
<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "WebSite",
  "url": "https://www.phcorner.net/",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "https://www.phcorner.net/search/search?keywords={search_keywords}",
    "query-input": "required name=search_keywords"
  }
}
</script>
</xen:if>

Just replace with your own domain.
I implement it already almost a week now.
 
I can't get this working... lol :p
Does it happen automatically? Or are there other gubbins I should do?

EDIT:
I've viewed the page source and that's all fine and whatnot.. Is it just something that happens when Google feels like? :)
 
I think I sort of found the right place. This looks interesting. Can anyone help point me in the right direction for adding a google search option into the XenForo search box? I'm constantly having to go to Google and use "site:example.com {topic}" style searches for my own site because the XenForo search can't often seem to find the pages I'm looking for. I had a Google powered search built into my old forum and I'm missing it. Thanks!
 
I think I sort of found the right place. This looks interesting. Can anyone help point me in the right direction for adding a google search option into the XenForo search box? I'm constantly having to go to Google and use "site:example.com {topic}" style searches for my own site because the XenForo search can't often seem to find the pages I'm looking for. I had a Google powered search built into my old forum and I'm missing it. Thanks!
https://xenforo.com/community/resources/reckons-team-google-custom-search.4165/
 
Is there a search that replaces or adds onto the default search a Google powered search that's available directly from this site and has been around for a while / checked to be OK?
 
Yes on latest version of XenForo ;)

How does this work do I need to enable this somewhere? I have never seen this search box on my google search it just shows my website name.
When I search for Xenforo.com it has a search box in google. (I use the default template currently)
 
Back
Top Bottom