谷歌改进了搜索结果中的搜索框不起作用 [英] Google improved search box within the search results not working

查看:31
本文介绍了谷歌改进了搜索结果中的搜索框不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遵循 Google 的教程以改进搜索搜索结果中的框,就像上面的截图一样.

I follow Google’s tutorial for improved search box within the search results just like above screenshot.

我在我的前端网站页面中添加了此代码:

I added this code in my front sitepage:

<script type="application/ld+json">
{
   "@context": "http://schema.org",
   "@type": "WebSite",
   "url": "https://www.xxx.com/",
   "potentialAction": {
   "@type": "SearchAction",
      "target": "https://www.xxx.com/search/site/{keys}",
      "query-input": "required name=keys"
    }
 }

 </script>

我做错了吗?我的网站使用 Drupal 7.

Am I doing something wrong? My site uses Drupal 7.

推荐答案

看起来正确(假设 /search/site/strawberry 成功搜索strawberry").

Looks correct (assuming that /search/site/strawberry successfully searches for "strawberry").

请注意,Google 不会显示 所有网站/查询的附加链接搜索框:

Note that Google is not displaying the Sitelinks Search Box for all sites/queries:

未显示搜索框?附加链接搜索框仅在导航查询和与用户相关时才会显示.Google 算法使用多种因素来确定框出现的时间,包括网站上的信息以及来自搜索用户的不同类型的导航查询.

Search box not displaying? The sitelinks search box appears only for navigational queries and when relevant for users. Google algorithms use a variety of factors to determine when the box appears, including the information on the site and different types of navigational queries from Search users.

2017-05-09 更新附加链接搜索框信息和网址

2017-05-09 Updated Sitelinks Search Box Information and URL

这篇关于谷歌改进了搜索结果中的搜索框不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆