如何使用Facetious在WordPress中添加高级搜索框

If you are working on a website with lots of content in custom taxonomies and post types, then you would want to make it easy for your users to find it. One way to do this is by allowing your users to narrow down their search. Previously we showed you how to create a WordPress search form with advance options to choose post type. However, it required adding code to your theme manually. In this article, we will show you how to add an advanced search box in WordPress using Facetious.

如果您正在使用自定义分类法文章类型中包含大量内容的网站,那么您将希望使用户轻松找到它。 一种方法是允许您的用户缩小搜索范围。 之前,我们向您展示了如何创建带有高级选项的WordPress 搜索表单来选择帖子类型。 但是,它需要手动向主题添加代码。 在本文中,我们将向您展示如何使用Facetious在WordPress中添加高级搜索框。

An advanced search form in WordPress

First thing you need to do is install and activate the Facetious plugin. Upon activation, the plugin adds a Facetious search widget under Appearance » Widgets. Drag and drop Facetious Search widget to your sidebar or any other widgetized area.

您需要做的第一件事是安装并激活Facetious插件。 激活后,该插件会在“ 外观»小部件”下添加一个Facetious搜索小部件 。 将Facetious Search小部件拖放到侧边栏或任何其他小部件化的区域。

Configuration options for Facetious search widget

The plugin allows you to choose which taxonomies and post types to include as a field for search criteria. You can even restrict the search to a particular post type such as posts, page, or media. Facetious also uses a custom permalink structure for search results page which allows the plugin to work well with caching plugins like WP Super Cache and W3 Total Cache.

该插件使您可以选择要包括在搜索标准字段中的分类法和帖子类型。 您甚至可以将搜索限制为特定的帖子类型,例如帖子,页面或媒体。 Facetious还对搜索结果页面使用了自定义的永久链接结构,该结构使该插件可以与WP Super CacheW3 Total Cache之类的缓存插件配合使用。

While allowing users to select categories, tags, and other options to narrow the search results, this option still uses the built-in WordPress search functionality. Most people would agree in saying that its not the best option. This is why we wrote how to add Google Custom Search in WordPress.

虽然允许用户选择类别,标签和其他选项来缩小搜索结果的范围,但此选项仍使用内置的WordPress搜索功能。 大多数人会同意这不是最佳选择。 这就是为什么我们编写了如何在WordPress中添加Google自定义搜索的原因

We hope that this article helped you add advanced search options to your WordPress website. For feedback and questions you can find us on Twitter and Facebook or you can leave a comment below.

我们希望本文能帮助您向WordPress网站添加高级搜索选项。 对于反馈和问题,您可以在TwitterFacebook上找到我们,也可以在下面留下评论。

翻译自: https://www.wpbeginner.com/plugins/how-to-add-an-advanced-search-box-in-wordpress-using-facetious/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值