• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

New Google's Sitelinks Search Box Addon

RoldanLT

Well-known member
#8
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.
 

Glockie

Well-known member
#9
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? :)
 

popowich

Active member
#12
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!
 

RoldanLT

Well-known member
#13
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/
 

popowich

Active member
#14
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?
 
#15
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)