Wordpress、PodCMS 和搜索
我有一个客户的 WordPress 网站。他拥有一家音像商店,我为他创建了一个网站来更新电影列表,通常只是“本周新”电影。
我使用 PodCMS 作为他上传电影然后显示它们的简单方法。他甚至不需要创建帖子。效果非常好,这是一个很棒的扩展,我只是遇到了一些问题。
Pod 有一个字段,您可以在其中插入发布日期。 2010-04-20
然后有一个 Pod 页面/模板组合,可以调用具有特定发行日期的电影,如下所示:$date = pods_url_variable('last');
然后,他使用 slug 2010-04-20
创建一个空白 WP 页面 因此,当您打开该页面时,Pod 页面/模板会读取该 slug 并呈现相应电影的列表。
我的问题: 我需要这些可以被搜索。这可能吗。
我也愿意接受有关使该网站正常运行的其他方法的建议。我需要它就这么简单。上传一些电影并创建一个新页面。然后剩下的就自动完成了。
I have a WordPress site for a client. He owns a video store, and I made a site for him to update the list of movies, usually just the "new this week" movies.
I used PodCMS as an easy way for him to upload movies and then display them. No need for him to even create posts. Works really well, it's a great extension, I'm just having some issues.
The Pod has a field where you insert the release date. 2010-04-20
Then there is a Pod page/template combo that calls the movies with a certain release date like this:$date = pods_url_variable('last');
He then just creates a blank WP page with the slug 2010-04-20
So when you open that page, the Pod page/template reads that slug and renders a list of the appropriate movies.
My problem:
I need these to be searchable. Is this possible.
I'm also open to suggestions on other ways to go about making this site work. I need it to be as simple as that. Uploads some movies and creates a new page. Then the rest is done automatically.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
PodsCMS 搜索只不过是对搜索词进行 mySQL 表搜索。您可以搜索标题、正文,几乎任何内容。下面是一个示例:
注意:我使用“whatever”作为 pod 信息。我还形成了一个进入 $where 位置的字符串,其中包含我想要搜索的各种 pod 变量。另外,我假设使用 Pods 分页控件进行分页,但我希望跨页面携带该变量,以便可以进行偏移。
A PodsCMS search is nothing more than a mySQL table search for the search term. You can search the title, body, pretty much anything. Here's an example:
Note: I'm using "whatever" as the pod info. I'm also forming a string that goes into the $where position which comprises the various pods variables I want to search on. Also, I'm assuming pagination using the Pods pagination controls but I want that variable carried across the pages so I can offset.
那么您需要 WordPress 页面内容(电影列表)可供搜索吗?
WP 本身并不搜索页面,但会使用 WordPress › 搜索所有内容 « WordPress 插件 并使用 WordPress › Relevanssi « WordPress 插件 进行更好的搜索
So you need the WordPress page content - the list of movies - to be searchable?
WP doesn't search pages natively, but will with WordPress › Search Everything « WordPress Plugins and search better with WordPress › Relevanssi « WordPress Plugins