Title: Search Exclude
Author: quadlayers
Published: <strong>2012 年 12 月 6 日</strong>
Last modified: 2026 年 5 月 22 日

---

搜索插件

![](https://ps.w.org/search-exclude/assets/banner-772x250.jpg?rev=2916925)

![](https://ps.w.org/search-exclude/assets/icon-256x256.png?rev=2916925)

# Search Exclude

 作者：[quadlayers](https://profiles.wordpress.org/quadlayers/)

[下载](https://downloads.wordpress.org/plugin/search-exclude.2.6.5.zip)

 * [详情](https://cn.wordpress.org/plugins/search-exclude/#description)
 * [评价](https://cn.wordpress.org/plugins/search-exclude/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/search-exclude/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/search-exclude/#developers)

 [支持](https://wordpress.org/support/plugin/search-exclude/)

## 描述

With this plugin you can exclude any page, post or whatever from the WordPress search
results by checking off the corresponding checkbox on post/page edit page.
 Supports
quick and bulk edit.

On the plugin settings page you can also see the list of all the items that are 
hidden from search.

### Presentation

[QuadLayers](https://quadlayers.com/) | [Community](https://www.facebook.com/groups/quadlayers/)

## 屏幕截图

[⌊screenshot-1.png⌉⌊screenshot-1.png⌉[

screenshot-1.png

[⌊screenshot-2.png⌉⌊screenshot-2.png⌉[

screenshot-2.png

## 安装

 1. Upload `search-exclude` directory to the `/wp-content/plugins/` directory
 2. 通过WordPress的的“Plugins”菜单激活插件
 3. Go to any post/page edit page and check off the checkbox `Exclude from Search Results`
    if you don’t want the post/page to be shown in the search results

## 常见问题

### Does this plugin affect SEO?

No, it does not affect crawling and indexing by search engines.
 The ONLY thing 
it does is hiding selected post/pages from your site search page. Not altering SEO
indexing.

If you want posts/pages to be hidden from search engines you may add the following
snippet to your `functions.php`:

    ```
    function add_meta_for_search_excluded()
    {
        global $post;
        if (false !== array_search($post->ID, get_option('sep_exclude', array()))) {
            echo '<meta name="robots" content="noindex,nofollow" />', "\n";
        }
    }
    add_action('wp_head', 'add_meta_for_search_excluded');
    ```

Note: already indexed pages will remain indexed for quite a while. In order to remove
them from Google index, you may use Google Search Console (or similar tool for other
engines).

### Are there any hooks or actions available to customize plugin behaviour?

Yes.
 There is an action `searchexclude_hide_from_search`. You can pass any post/
page/custom_post ids as an array in the first parameter. The second parameter specifies
state of visibility in search. Pass true if you want to hide posts/pages, or false–
if you want show them in the search results.

Example:
 Let’s say you want “Exclude from Search Results” checkbox to be checked
off by default for newly created posts, but not pages. In this case you can add 
following code to your theme’s function.php:

    ```
    add_filter('default_content', 'exclude_new_post_by_default', 10, 2);
    function exclude_new_post_by_default($content, $post)
    {
        if ('post' === $post->post_type) {
            do_action('searchexclude_hide_from_search', array($post->ID), true);
        }
    }
    ```

Also there is a filter `searchexclude_filter_search`.
 With this filter you can 
turn on/off search filtering dynamically. Parameters: $exclude – current search 
filtering state (specifies whether to filter search or not) $query – current WP_Query
object

By returning true or false you can turn search filtering respectively.

Example:
 Let’s say you need to disable search filtering if searching by specific
post_type. In this case you could add following code to you functions.php:

    ```
    add_filter('searchexclude_filter_search', 'filterForProducts', 10, 2);
    function filterForProducts($exclude, $query)
    {
        return $exclude && 'product' !== $query->get('post_type');
    }
    ```

## 评价

![](https://secure.gravatar.com/avatar/927e82c9a2d326b53564ea5b5f9c5abe18c89e66b915f36de260c978956613f1?
s=60&d=retro&r=g)

### 󠀁[Search Exclude](https://wordpress.org/support/topic/search-exclude-3/)󠁿

 [moshade](https://profiles.wordpress.org/moshade/) 2026 年 7 月 5 日 1 回复

Does what it needs to do. Good and fit for purpose. I can hide pages and make sure
its specific for an invited audience only.

![](https://secure.gravatar.com/avatar/db8a9ed615c7955bc4f51631a7df086b9f16b1cb9408fbac7acc3bf51bd6e3a9?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-41421/)󠁿

 [paulroberts](https://profiles.wordpress.org/paulroberts/) 2026 年 4 月 12 日 1
回复

Great plugin

![](https://secure.gravatar.com/avatar/be0685f55b2e5ed7eadad3bf90b4396aae385548f78ccfa039b6d5c5e26d4700?
s=60&d=retro&r=g)

### 󠀁[I didn’t know how desperately I needed this plugin](https://wordpress.org/support/topic/the-plugin-i-didnt-now-i-really-needed/)󠁿

 [paarseolifant](https://profiles.wordpress.org/paarseolifant/) 2026 年 2 月 3 日
1 回复

It took me literally years to find out that (for instance) the download pages of
my freebies could and would come up in every search result on my page. Thanks to
this plugin they don’t anymore and it was a breeze to install and to implement, 
so all 5 stars: well deserved!

![](https://secure.gravatar.com/avatar/53c954cc8c86996f9d5e7faa8e15be932d917be82bc018984fa7fa503d7ac832?
s=60&d=retro&r=g)

### 󠀁[Did exactly what was needed](https://wordpress.org/support/topic/did-exactly-what-was-needed/)󠁿

 [onestudioteam](https://profiles.wordpress.org/onestudioteam/) 2025 年 12 月 2 
日 1 回复

Very helpful plugin

![](https://secure.gravatar.com/avatar/1dbb307c82c751e3c4aed6638ba94f144eef34ce113651a870744e2a663c6d35?
s=60&d=retro&r=g)

### 󠀁[Very Useful & Powerfull](https://wordpress.org/support/topic/very-useful-powerfull/)󠁿

 [mrebel](https://profiles.wordpress.org/mrebel/) 2025 年 11 月 30 日 1 回复

This plugin is THE key to helping our website visitors and customers find what they
are looking for. (By blocking all the less important pages that happen to contain
popular keywords.)

![](https://secure.gravatar.com/avatar/26a81a00ea8b43f89dde671124e106a346a8a045e80d53e8d412da59842577aa?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-41083/)󠁿

 [manjas](https://profiles.wordpress.org/manjas/) 2025 年 11 月 28 日 1 回复

Really great if you don’t want (part of) your site indexed by search engines.

 [ 阅读所有217条评价 ](https://wordpress.org/support/plugin/search-exclude/reviews/)

## 贡献者及开发者

「Search Exclude」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ quadlayers ](https://profiles.wordpress.org/quadlayers/)
 *   [ pronskiy ](https://profiles.wordpress.org/pronskiy/)
 *   [ williamdodson ](https://profiles.wordpress.org/williamdodson/)
 *   [ stevelock ](https://profiles.wordpress.org/stevelock/)

「Search Exclude」插件已被翻译至 5 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/search-exclude/contributors)
为本插件所做的贡献。

[帮助将「Search Exclude」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/search-exclude)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/search-exclude/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/search-exclude/)，或通过[RSS](https://plugins.trac.wordpress.org/log/search-exclude/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/search-exclude/)。

## 更新日志

#### 2.6.5

 * WordPress 7.0 compatibility

#### 2.6.4

 * fix: include post types with exclude_from_search=false in search exclude settings

#### 2.6.3

 * fix: php errors

#### 2.6.2

 * Custom post type compatibility

#### 2.6.1

 * fix: REST API permission error for Editors in Block Editor

#### 2.6.0

 * WordPress compatibility

#### 2.5.9

 * fix: update dependencies

#### 2.5.8

 * fix: security issues

#### 2.5.7

 * fix: php 7.2 errors

#### 2.5.6

 * fix: update dependencies

#### 2.5.5

 * fix: update dependencies

#### 2.5.4

 * fix: improve get_terms to reduce term load time

#### 2.5.3

 * fix: user editor posts permissions

#### 2.5.2

 * fix: update dependencies

#### 2.5.1

 * fix: update dependencies

#### 2.5.0

 * fix: security issues

#### 2.4.9

 * fix: load plugin textdomain

#### 2.4.8

 * WordPress compatibility

#### 2.4.7

 * fix: terms exclusion
 * fix: Content Control plugin compatibility

#### 2.4.6

 * fix: update readme.txt

#### 2.4.5

 * fix: search exclude in ajax

#### 2.4.4

 * fix: load plugin textdomain

#### 2.4.3

 * fix: search exclude documentation url

#### 2.4.2

 * fix: update jetpack autoload

#### 2.4.1

 * fix: php errors

#### 2.4.0

 * fix: implement jetpack autoload

#### 2.3.0

 * fix: php errors
 * fix: improve allowed screen logic
 * fix: scripts in custom post types
 * fix: advanced custom fields compatibility

#### 2.2.0

 * fix: php errors

#### 2.1.9

 * fix: php errors
 * fix: compatibility with classic editor

#### 2.1.8

 * WordPress 6.7 compatibility

#### 2.1.7

 * fix: WordPress 6.1.3 compatibility
 * fix: big queries
 * Remove notification

#### 2.1.6

 * Refactor update

#### 2.1.5

 * Refactor

#### 2.1.4

 * WordPress compatibility

#### 2.1.3

 * WordPress compatibility

#### 2.1.2

 * WordPress compatibility

#### 2.1.1

 * Packages update

#### 2.1.0

 * WordPress compatibility

#### 2.0.9

 * fix: PHP errors

#### 2.0.8

 * Translation strings

#### 2.0.7

 * WordPress compatibility

#### 2.0.6

 * WordPress compatibility

#### 2.0.5

 * Update portfolio link

#### 2.0.4

 * WordPress compatibility

#### 2.0.3

 * fix: strings translations

#### 2.0.2

 * fix: strings translations

#### 2.0.1

 * fix: strings translations

#### 2.0.0

 * i18n implemented
 * Composer implemented
 * Autoload implemented
 * Rename files to fit WordPress Development rules
 * Rename classes to fit WordPress Development rules
 * Rename variables to fit WordPress Development rules

#### 1.3.1

 * Author update.

#### 1.3.0

 * fix: and rework bulk edit: The `Bulk actions` dropdown now offers hide/show actions.

#### 1.2.7

 * This is a security release. All users are encouraged to upgrade.
 * fix: possible XSS vulnerability.

#### 1.2.6

 * fix: compatibility with WordPress 5.5

#### 1.2.5

 * Security release. More protection added.

#### 1.2.4

 * Security release. All users are encouraged to update.
 * Added filter searchexclude_filter_permissions.

#### 1.2.2

 * Added action searchexclude_hide_from_search
 * Added filter searchexclude_filter_search
 * Fixed Bulk actions for Firefox

#### 1.2.1

 * Fixed bug when unable to save post on PHP <5.5 because of boolval() usage

#### 1.2.0

 * Added quick and bulk edit support
 * Tested up to WP 4.1

#### 1.1.0

 * Tested up to WP 4.0
 * Do not show Plugin on some service pages in Admin
 * Fixed conflict with bbPress
 * Fixed deprecation warning when DEBUG is on

#### 1.0.6

 * Fixed search filtering for AJAX requests

#### 1.0.5

 * Not excluding items from search results on admin interface

#### 1.0.4

 * Fixed links on settings page with list of excluded items
 * Tested up to WP 3.9

#### 1.0.3

 * Added support for excluding attachments from search results
 * Tested up to WP 3.8

#### 1.0.2

 * Fixed: Conflict with Yoast WordPress SEO plugin

#### 1.0.1

 * Fixed: PHP 5.2 compatibility

#### 1.0

 * Initial release

## 额外信息

 *  版本 **2.6.5**
 *  最后更新：**3 月前**
 *  活跃安装数量 **50,000+**
 *  WordPress 版本 ** 4.7 或更高版本 **
 *  已测试的最高版本为 **7.0.4**
 *  PHP 版本 ** 5.6 或更高版本 **
 *  语言
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/search-exclude/) 、 [Dutch (Belgium)](https://nl-be.wordpress.org/plugins/search-exclude/)、
   [English (US)](https://wordpress.org/plugins/search-exclude/) 、 [French (France)](https://fr.wordpress.org/plugins/search-exclude/)、
   [Russian](https://ru.wordpress.org/plugins/search-exclude/) 和 [Ukrainian](https://uk.wordpress.org/plugins/search-exclude/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/search-exclude)
 * 标签
 * [exclude page](https://cn.wordpress.org/plugins/tags/exclude-page/)[exclude post](https://cn.wordpress.org/plugins/tags/exclude-post/)
   [search](https://cn.wordpress.org/plugins/tags/search/)[search exclude](https://cn.wordpress.org/plugins/tags/search-exclude/)
   [wordpress search](https://cn.wordpress.org/plugins/tags/wordpress-search/)
 *  [高级视图](https://cn.wordpress.org/plugins/search-exclude/advanced/)

## 评级

 4.8 星（最高 5 星）。

 *  [  203 条 5 星评价     ](https://wordpress.org/support/plugin/search-exclude/reviews/?filter=5)
 *  [  5 条 4 星评价     ](https://wordpress.org/support/plugin/search-exclude/reviews/?filter=4)
 *  [  1 条 3 星评价     ](https://wordpress.org/support/plugin/search-exclude/reviews/?filter=3)
 *  [  1 条 2 星评价     ](https://wordpress.org/support/plugin/search-exclude/reviews/?filter=2)
 *  [  7 条 1 星评价     ](https://wordpress.org/support/plugin/search-exclude/reviews/?filter=1)

[您的评价](https://wordpress.org/support/plugin/search-exclude/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/search-exclude/reviews/)

## 贡献者

 *   [ quadlayers ](https://profiles.wordpress.org/quadlayers/)
 *   [ pronskiy ](https://profiles.wordpress.org/pronskiy/)
 *   [ williamdodson ](https://profiles.wordpress.org/williamdodson/)
 *   [ stevelock ](https://profiles.wordpress.org/stevelock/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/search-exclude/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://quadlayers.com/)