WordPress 对小部件文本执行搜索
有谁知道可以扫描小部件文本(任意文本)的黑客或搜索插件。目前,我注意到搜索中仅考虑页面文本区域中的文本。但我有文本小部件,其中包含同样重要的文本,但搜索结果中没有考虑这些文本。
Does anyone know of a hack or search plugin that will scan the Widgets Text (Arbitrary text). Currently I'm noticing that only text in the Pages text area is being consider in the search. But I have Text widgets with just as important text on it not being consider in the search results.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
存在三个问题:
小部件文本在选项表中保存为序列化数组。转到
/wp-admin/options.php
查看它。在这里搜索很困难,而且可能非常慢。小部件没有 URI。搜索结果中链接的目标应该是什么?
一些小部件包含其他地方可用的文本(最新帖子等)。应该优先选择哪个位置?
您可以搜索小部件选项并使用重写 API 为小部件创建漂亮的 URI - 但 3. 相当困难。我无法为此想出一个优雅的解决方案。
仅供参考:wordpress.stackexchange.com 上有一个完整的 WordPress 黑客网络。你在那里可能会有更多的运气。
There are three problems:
The widget text is saved as an serialized array in the options table. Go to
/wp-admin/options.php
to see it. Searching here is difficult and probably very slow.A widget has no URI. What should be the link’s target in a search result?
Some widgets contain text which is available elsewhere (latest posts etc.). Which position should be preferred?
You can search in widget options and create nice URIs for widgets using the rewrite API – but 3. is rather difficult. I couldn’t come up with an elegant solution for this.
FYI: There’s a whole network of WordPress hackers on wordpress.stackexchange.com. You may have more luck there.