wordpress百度搜索_如何在WordPress中按类别搜索

wordpress百度搜索

Categories allow website owners to sort their content while making it easier for their users to browse the site. At WPBeginner we use different categories to sort content on our site. For example, when a user arrives on our site, they can go directly to the beginners guide section or WordPress tutorials. Doing so they will be able to skip posts in our other categories. Sometimes you may want your users to be able to search inside a specific category rather than the entire site. In the past, we wrote an article about how to create an advanced search form for custom post types, and a lot of you asked if there was a way to do the same thing for categories. In this article we will show you how to add search by category functionality in your WordPress site. The goal is to add a search box that allows visitors to search inside specific categories.

类别使网站所有者可以对内容进行排序,同时使用户更容易浏览网站。 在WPBeginner,我们使用不同的类别对网站上的内容进行排序。 例如,当用户到达我们的网站时,他们可以直接转到初学者指南部分或WordPress教程 。 这样一来,他们将可以跳过我们其他类别的帖子。 有时您可能希望您的用户能够在特定类别而不是整个站点内进行搜索。 过去,我们写了一篇有关如何为自定义帖子类型创建高级搜索表单的文章 ,很多人都问是否有一种方法可以对类别进行相同的操作。 在本文中,我们将向您展示如何在WordPress网站中添加按类别搜索功能。 目标是添加一个搜索框,以允许访问者在特定类别内进行搜索。

First thing you need to do is install and activate the Category Wise Search plugin. Upon activation, you need to visit Appearance » Widgets page. There you will notice a new Category Wise Search widget in the list of available widgets. Simply drag and drop the widget to your sidebar and configure the widget options.

您需要做的第一件事是安装并激活Category Wise Search插件。 激活后,您需要访问外观»小部件页面。 在那里,您会在可用小部件列表中注意到一个新的类别明智搜索小部件。 只需将小部件拖放到侧边栏并配置小部件选项。

Search by Category Widget settings

The widget’s settings allow you to exclude categories from the search box. Leaving exclude categories box empty will will show all your categories in the drop down menu. When you are done simply click on the save button to store your widget settings.

小部件的设置可让您从搜索框中排除类别。 将排除类别框保留为空白将在下拉菜单中显示所有类别。 完成后,只需单击保存按钮即可存储小部件设置。

You can now visit your website to see the search by category feature in action.

现在,您可以访问您的网站以查看按类别搜索功能。

Search by category feature in action on a WordPress site

Category Wise Search plugin allows you to exclude categories from your search results, but you can also exclude pages from WordPress search results. Remember that this search by category plugin will only be helpful if you are using categories and tags the right way. We hope this article help you improve your site search by adding search by category feature in WordPress. We are curious to know how many of you still use default WordPress search box on your websites? How many of you are using something advanced like custom post type search, search by category, google custom search, Amazon CloudSearch with Lift, etc? Let us know in your comments below.

类别明智搜索插件可让您从搜索结果中排除类别,但也可以从WordPress搜索结果中排除页面 。 请记住,仅当您以正确的方式使用类别和标签时 ,此按类别搜索插件才有 。 我们希望本文通过在WordPress中添加按类别搜索功能来帮助您改善网站搜索。 我们很想知道您中有多少人还在网站上使用默认的WordPress搜索框? 你们中有多少人在使用高级功能,例如自定义帖子类型搜索,按类别搜索, google自定义搜索带Lift的Amazon CloudSearch等? 在下面的评论中让我们知道。

翻译自: https://www.wpbeginner.com/plugins/how-to-search-by-category-in-wordpress/

wordpress百度搜索

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值