诗人博客分享两种WP博客的站内搜索方式
一种的调用WP的,代码如下
1 2 3 4 | <form id="searchform" action="https://www.bluenoob.com/" method="get"> <input name="s" type="text" style="width:400px;height:40px" /> <input type="submit" value="你给我出来" style="width:120px;height:40px" /></div> </form> |
另外一种是使用谷歌的自定义搜索,
这个搜索会从当前所有的友情链接中搜索,比较强大
不过也有不足的地方,
就拿诗人博客来说,
我用的主题的footer.php是被加密的,绑了链接,像我这种菜鸟是不会解密的
这就杯具了。影响搜索
谷歌自定义搜索代码如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | <!-- 使用该代码即表示您同意接受 Google 自定义搜索服务条款。 --> <!-- 有关服务条款,请访问 http://www.google.com/cse/docs/tos.html?hl=zh-CN --> <form name="cse" id="searchbox_demo" action="http://www.google.com/cse"> <input type="hidden" name="cref" value="" /> <input type="hidden" name="ie" value="utf-8" /> <input type="hidden" name="hl" value="zh-CN" /> <input name="q" type="text" size="40" /> <input type="submit" name="sa" value="搜索" /> </form> <script type="text/javascript" src="http://www.google.com/cse/tools/onthefly?form=searchbox_demo&lang=zh-CN"></script> |
会员登录关闭
注册会员关闭