wordpress搜索插件_12个WordPress搜索插件可改善您的网站搜索

wordpress搜索插件

Do you want to improve your WordPress site search? We all know that the default WordPress search feature is fairly limiting. However, there are several WordPress search plugins that can help you improve the default search experience. In this article, we will highlight the best WordPress search plugins and tutorials to customize and improve your site search.

您想改善WordPress网站搜索吗? 我们都知道默认的WordPress搜索功能是相当有限的。 但是,有几个WordPress搜索插件可以帮助您改善默认搜索体验。 在本文中,我们将重点介绍最好的WordPress搜索插件和教程,以自定义和改进您的站点搜索。

1. SearchWP (1. SearchWP)

SearchWP

SearchWP is a powerful custom search plugin for WordPress. It is very easy to use and the search results are relatively more accurate.

SearchWP是一个功能强大的WordPress自定义搜索插件。 它非常易于使用,搜索结果相对更准确。

It allows searches for your keyword in post/page title, content, slug, categories, tags, taxonomies, excerpt and even comments. You can control the algorithm by assigning weight to each content type from 1 to 10 where 10 being the highest.

它允许您在帖子/页面标题,内容,条目,类别,标签,分类法,摘录甚至评论中搜索您的关键字。 您可以通过为1到10的每种内容类型分配权重来控制算法,其中10为最高。

Upon activation, the plugin automatically indexes your content and replaces the default search feature in WordPress. See our article on how to improve WordPress search with SearchWP for more detailed instructions.

激活后,该插件会自动为您的内容建立索引并替换WordPress中的默认搜索功能。 有关更详细的说明,请参阅我们的文章如何使用SearchWP改进WordPress搜索

2.向WordPress搜索添加分类过滤器 (2. Adding a Taxonomy Filter to WordPress Search)

Ajax based WordPress Search Plugin

If you are using categories, tags, or any other custom taxonomy to sort content, then adding a taxonomy filter to search can greatly help users narrow down the results.

如果您使用类别,标签或任何其他自定义分类法对内容进行排序,则添加分类法过滤器进行搜索可以极大地帮助用户缩小结果范围。

Ajax WP Query Search Filter allows you to create custom WordPress search forms with checkboxes for taxonomies, post types and custom fields.

Ajax WP查询搜索过滤器允许您创建带有分类法,帖子类型和自定义字段复选框的自定义WordPress搜索表单。

It uses Ajax to load results, so it works really fast and provides a better experience for users. Take a look at our tutorial on how to add ajax taxonomy filter in WordPress search to learn more.

它使用Ajax加载结果,因此它的工作速度非常快,并为用户提供了更好的体验。 看看我们的教程,了解如何在WordPress搜索中添加ajax分类过滤器以了解更多信息。

3. Swiftype搜索 (3. Swiftype Search)

Swiftype Search Engine for WordPress

Switype is a site search service that comes with a free and paid version. Their WordPress plugin replaces your default WordPress search with Swiftype.

Switype是一种网站搜索服务,带有免费和付费版本。 他们的WordPress插件用Swiftype替换了您的默认WordPress搜索。

Swiftype will index your documents, and it works way faster than default WordPress search. Results are extremely relevant. Swiftype will also store user searches and will show you what users searched for, what they clicked on, and other cool analytics.

Swiftype将为您的文档建立索引,并且比默认的WordPress搜索更快。 结果非常相关。 Swiftype还将存储用户搜索,并向您显示用户搜索的内容,单击的内容以及其他出色的分析。

See our guide on how to improve WordPress search With Swfitype search for step by step instructions.

请参阅有关如何使用Swfitype搜索改进WordPress搜索的指南,以获取逐步说明。

4. Google自定义搜索WordPress (4. Google Custom Search for WordPress)

Google Custom Search for WordPress Sites

When it comes to search, Google is undoubtedly the king. The good thing is that you can create a custom Google search engine for your site and integrate it into WordPress.

在搜索方面,谷歌无疑是国王。 好消息是,您可以为您的网站创建一个自定义Google搜索引擎,并将其集成到WordPress中。

The downside is that it comes with Google’s personal branding, which may not be so bad because users already trust this brand.

缺点是它带有Google的个人品牌,这可能还不错,因为用户已经信任该品牌。

We have a step by step tutorial on how to add Google search in a WordPress site.

我们提供了有关如何在WordPress网站中添加Google搜索的分步教程。

5.按类别搜索 (5. Search by Category)

Search by category plugin for WordPress

Category Wise Search plugin allows you to add a category drop down to WordPress search. Users can limit their search to a specific category to narrow down the results. The plugin also allows you to exclude categories from the search, and you can easily add it using a widget for your sidebar.

类别明智搜索插件可让您向WordPress搜索添加类别下拉菜单。 用户可以将搜索限制在特定类别以缩小搜索范围。 该插件还允许您从搜索中排除类别,并且可以使用侧边栏小部件轻松添加它。

Take a look at our article on how to search by category in WordPress.

看看我们有关如何在WordPress中按类别搜索的文章。

6.突出显示搜索词 (6. Highlight Search Terms)

Highlighting search terms in WordPress search results

Highlighting search terms in the results page can help improve the user experience. It also increases the chances of them finding what they are looking.

在结果页面中突出显示搜索词可以帮助改善用户体验。 这也增加了他们找到所寻找东西的机会。

If you are using the default WordPress search, then you can easily implement this by editing the search results template in your child theme. For detailed instructions see our article on how to highlight search terms in WordPress search results.

如果您使用默认的WordPress搜索,则可以通过在子主题中编辑搜索结果模板来轻松实现此目的。 有关详细说明,请参阅有关如何在WordPress搜索结果中突出显示搜索词的文章。

7.在WordPress中显示搜索词和结果计数 (7. Display Search Term and Result Count in WordPress)

Displaying search term and result count in WordPress search

There are several things you can do by editing your theme or child theme’s search.php template. One of these things is to show users the search term and the number of results. Simply add this code to your search.php template.

您可以通过编辑主题或子主题的search.php模板来完成几件事。 这些事情之一就是向用户显示搜索词和结果数。 只需将此代码添加到您的search.php模板中。


<h1 class="page-title">Search Result for <?php /* Search Count */ $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = wp_specialchars($s, 1); $count = $allsearch->post_count; _e(''); _e('<span class="search-terms">'); echo $key; _e('</span>'); _e(' &mdash; '); echo $count . ' '; _e('articles'); wp_reset_query(); ?></h1>

This code will simply display search term and the number of results found. You can use .search-terms CSS class to highlight the search terms using CSS.

该代码将仅显示搜索词和找到的结果数。 您可以使用.search-terms CSS类来突出显示使用CSS的搜索词。

8.为自定义帖子类型创建高级搜索表单 (8. Create an Advanced Search Form For Custom Post Types)

Advanced custom WordPress search form for post types

Custom Post Types allow you to add different content types to your WordPress site. For example, at WPBeginner we use custom post types for Glossary and Deals sections.

自定义帖子类型允许您将不同的内容类型添加到WordPress网站。 例如,在WPBeginner,我们为“ 词汇表”和“ 交易”部分使用自定义帖子类型。

Many WordPress sites have custom post types for products, reviews, recipes, etc. However, the default WordPress search is not very good at handling post types. Wouldn’t it be nice if you had a search form where users can just check what post type they want to search and narrow down their results?

许多WordPress网站都有针对产品,评论,食谱等的自定义帖子类型。但是,默认的WordPress搜索不是很擅长处理帖子类型。 如果您有一个搜索表单,用户可以只检查他们要搜索的帖子类型并缩小搜索范围,那岂不是很好?

We have a detailed tutorial on how to create an advanced search form in WordPress for Custom Post Types.

我们有一个详细的教程,介绍如何在WordPress中为自定义帖子类型创建高级搜索表单

9.简单地排除 (9. Simply Exclude)

Exclude specific content from custom WordPress search

Sometimes you may want to exclude specific content from search results. Simply Exclude is a WordPress plugin that allows you to exclude content based on your selected criteria.

有时您可能想从搜索结果中排除特定内容。 Simply Exclude是一个WordPress插件,可让您根据所选条件排除内容。

For example, you can exclude all posts tagged featured, or all posts in category showcase, etc. Take a look at our tutorial on how to exclude specific pages, authors, and more from WordPress search.

例如,您可以排除所有标记为特色的帖子,也可以排除类别展示柜中的所有帖子,等等。看看我们的教程,如何从WordPress搜索中排除特定的页面,作者等

10.在WordPress中使用多个搜索表单 (10. Using Multiple Search Forms in WordPress)

The default WordPress search may be useless, but with little tweaks it can be improved quite a lot.

默认的WordPress搜索可能没有用,但是只需进行一些微调,就可以进行很多改进。

Earlier we mentioned creating a search form for custom post types. But what if you wanted to show different search forms on different pages? How about showing more than one search form in WordPress?

前面我们提到过为自定义帖子类型创建搜索表单。 但是,如果您想在不同的页面上显示不同的搜索形式怎么办? 如何在WordPress中显示多个搜索表单?

This can be easily achieved by creating different search forms and search results templates with different queries. Take a look at our tutorial on how to use multiple search forms in WordPress for detailed instructions.

通过创建具有不同查询的不同搜索表单和搜索结果模板,可以轻松实现这一目标。 查看有关如何在WordPress中使用多个搜索表单的教程,以获取详细说明。

11.在WordPress帖子中添加搜索表单 (11. Adding Search Form in a WordPress Post)

Sometimes you may want to add a search form inside a post or page to encourage users to search for content on your site. The default WordPress search form is a plain HTML form. However, if you wanted to add the search form inside your posts or pages, the HTML will be stripped by WordPress.

有时,您可能想在帖子或页面内添加搜索表单,以鼓励用户搜索您网站上的内容。 默认的WordPress搜索表单是纯HTML表单。 但是,如果您想在帖子或页面中添加搜索表单,则WordPress将删除HTML。

This can be resolved by creating a simple shortcode that displays the search form and then using the shortcode inside your post or page. Simply add this code to your theme’s functions.php file or a site-specific plugin.

可以通过创建一个简单的短代码来显示搜索表单,然后在您的帖子或页面中使用该短代码来解决此问题。 只需将此代码添加到主题的functions.php文件或特定于站点的插件中即可。


add_shortcode('wpbsearch', 'get_search_form');

Use shortcode [wpbsearch] to display search form inside your post/pages. For more detailed instructions take a look at our tutorial on how to add search form in your post with a WordPress search shortcode. You can also add a custom WordPress search form using this method.

使用简码[wpbsearch]在您的帖子/页面内显示搜索表单。 有关更详细的说明,请参阅我们的教程,该教程如何使用WordPress搜索简码在您的帖子中添加搜索表单 。 您也可以使用此方法添加自定义WordPress搜索表单。

12. 在WordPress中添加语音搜索 (12. Add Voice Search in WordPress)

Preview of voice search in WordPress

If you have a smartphone, then you are probably familiar with voice search using Siri, Google Now, or Cortana. Wouldn’t it be nice if you can bring voice search functionality to your WordPress site? Well now you can.

如果您拥有智能手机,则可能熟悉使用Siri,Google即时或Cortana进行语音搜索。 如果您可以将语音搜索功能引入WordPress网站,那不是很好吗? 好吧,现在可以。

WordPress Voice Search plugin allows you to add voice search capabilities to your WordPress search form.

WordPress语音搜索插件可让您向WordPress搜索表单添加语音搜索功能。

See our article on how to add voice search in WordPress.

请参阅有关如何在WordPress中添加语音搜索的文章。

We hope this article helped you improve your WordPress search. You may also want to check out the best WordPress tools and plugins for affiliate marketers.

我们希望本文能帮助您改善WordPress搜索。 您可能还想为联属网络营销商查看最佳的WordPress工具和插件

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/showcase/12-wordpress-search-plugins-to-improve-your-site-search/

wordpress搜索插件

  • 0
    点赞
  • 0
    评论
  • 2
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

表情包
插入表情
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符
©️2021 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值