Tumblr:搜索未返回搜索结果
我是 tumblr 新手,正在尝试在自定义主题中实现搜索。我有:
<form action="/search" method="get" id="search-form">
<input type="text" name="q" class="query" value="" />
<input type="submit" value="Search" class="submit" />
<div class="clear"></div>
</form>
我有大约十几个帖子。每当我在任何帖子中搜索任何内容时,Tumblr 总是不返回任何搜索结果。我觉得我失去了一些东西。我是否要在主题中的其他位置实施或设置任何配置?在用户的 Tumblr 主题中实现搜索还需要什么?
谢谢!
I'm new to tumblr and am trying to implement Search in a custom theme. I have:
<form action="/search" method="get" id="search-form">
<input type="text" name="q" class="query" value="" />
<input type="submit" value="Search" class="submit" />
<div class="clear"></div>
</form>
I have about a dozen posts. Whenever I search for anything in any post, Tumblr always returns no search results. I feel like I'm missing something. Am I to implement or set any configuration anywhere else in the theme? What else is needed to implement search in a user's Tumblr theme?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我使用的解决方案。将其放入代码的
中:
并将其放置在您希望搜索框出现的位置:
使用 CSS 根据您的意愿设置样式。这只会搜索您的标签,但与常规的 Tumblr 搜索不同,它有效。
Here's the solution I use. Put this into the
<head>
of your code:And place this where you want the search box to appear:
Use CSS to style as you wish. This will search your tags only, but unlike the regular Tumblr search it works.
当我的博客受到密码保护时,我没有得到任何结果。我从 Tumblr Dashboard > 中删除了密码保护设置>博客名称>密码,它再次开始返回结果。
I was getting no results when my blog was password protected. I removed the password protection from Tumblr Dashboard > settings > blog name > password and it started returning results again.