Title: Block Finder
Author: Troy Chaplin
Published: <strong>2024 年 9 月 2 日</strong>
Last modified: 2026 年 5 月 16 日

---

搜索插件

![](https://ps.w.org/block-finder/assets/banner-772x250.png?rev=3533774)

![](https://ps.w.org/block-finder/assets/icon-256x256.png?rev=3533774)

# Block Finder

 作者：[Troy Chaplin](https://profiles.wordpress.org/areziaal/)

[下载](https://downloads.wordpress.org/plugin/block-finder.1.1.0.zip)

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

 [支持](https://wordpress.org/support/plugin/block-finder/)

## 描述

**Ever needed to track down where a specific block is being used?** Block Finder
adds a dashboard widget that searches your entire site for any core or custom block.
Pick a block, click Search, and instantly see every place it appears — along with
a count of how many times it’s used, whether it’s nested inside another block, and
a direct link to edit that content.

No more manually opening posts one by one hoping to find the right block. Block 
Finder does the searching so you don’t have to.

#### Who is this for?

**Content editors and site managers** — need to update every post that uses a specific
call-to-action block? Wondering which pages are still using a block you’re about
to change? Block Finder gives you the answer in seconds, with one-click access to
edit each result.

**Developers and theme builders** — auditing block usage across templates and template
parts in the Site Editor, checking registered patterns, or running automated checks
from the command line. Block Finder has you covered.

#### Features

**Search your way:**

 * Type-ahead block picker powered by WordPress’s native Combobox — no hunting through
   a long list
 * Search Posts, Patterns, Templates, and Template parts all from one form
 * Filter by post type to narrow results, or search across everything at once
 * Filter by post status — include drafts, pending, scheduled, and private content
   alongside published

**Understand what you find:**

 * See the total number of times a block appears in each piece of content
 * InnerBlock detection shows how many of those instances are nested inside another
   block
 * Source badges make it clear at a glance whether a result came from a post, a 
   pattern, a template, or a template part
 * Status badges surface non-published content so nothing gets missed

**Act on results quickly:**

 * Direct edit links open any result straight in the block editor or Site Editor
 * Paginated results keep large result sets easy to browse
 * Filter between all instances and nested-only with a single click

#### For Developers and Theme Builders

**WP-CLI** — run `wp block-finder search <block>` from the command line. Supports`--
post-type`, `--post-status`, `--sources`, and `--format=table|json|csv|count|ids`.
Use `--format=count` in CI pipelines or `--format=csv` for export and audit reports.

**Template and template part search** — find blocks inside Site Editor templates
on any block theme. Both file-based and database-stored templates are included.

**Pattern search** — covers user-saved synced patterns and every pattern registered
by your theme or plugins via `WP_Block_Patterns_Registry`, not just the ones saved
to the database.

**Developer hooks** — extend or modify search behaviour without touching plugin 
code:

 * `block_finder_sources` — add or remove sources before the search runs
 * `block_finder_results` — modify the assembled result set before it is returned

**REST API** — `GET /wp-json/block-finder/v1/search` is available for custom integrations.
Requires `edit_posts` capability.

## 屏幕截图

 * [[
 * Block Finder dashboard widget ready to search various content types.
 * [[
 * Type ahead helps you easily find blocks in a list.
 * [[
 * Search results for published and draft posts containing the core paragraph block.
 * [[
 * Search results for the core group block in patterns and template parts.

## 安装

 1. Upload the plugin folder to `/wp-content/plugins/`, or install directly from the
    WordPress plugin directory.
 2. Activate the plugin from the **Plugins** page.
 3. Visit your WordPress **Dashboard** and find the **Block Finder** widget.

## 常见问题

### How do I search for a block?

Open the WordPress dashboard and find the Block Finder widget. Type the name of 
any block into the search field, choose where to look (“Search in”), optionally 
narrow by post type and status, then click **Find Block**.

### What does “Search in” control?

It lets you choose which content sources to include:

 * **Posts** — all public post types that support the block editor
 * **Patterns** — user-saved synced patterns plus any registered by your theme or
   plugins
 * **Templates** and **Template parts** — Site Editor content; only available on
   block themes

### What are InnerBlocks?

InnerBlocks are blocks nested inside other blocks — a Paragraph inside a Group, 
or a Button inside a Cover. Block Finder shows you the total usage count and how
many are nested, so you know whether a block appears standalone or embedded inside
another.

### Can I search from the command line?

Yes. With WP-CLI installed, run `wp block-finder search <block-name>` for a quick
table output. Use `--format=count` for CI checks or `--format=csv` for audit exports.
Run `wp block-finder search --help` for all available options.

### Does it work with custom post types?

Yes. Any public post type that supports the block editor is automatically included.

### Does it work with classic themes?

Partially. Post, pattern, and custom post type searches work on any theme. Template
and template part search requires a block theme because those content types only
exist in the Site Editor.

### How do I uninstall?

Deactivate and delete the plugin from the Plugins page. All cached search data is
removed from the database automatically on uninstall.

## 评价

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

### 󠀁[Block Finder – A Lifesaver for Large-Scale Gutenberg Migration](https://wordpress.org/support/topic/block-finder-a-lifesaver-for-large-scale-gutenberg-migration/)󠁿

 [charlottebradley](https://profiles.wordpress.org/charlottebradley/) 2024 年 9 
月 4 日

Block Finder has been an invaluable tool throughout our migration of over 700 websites
from WordPress Classic to Gutenberg. At the beginning of the migration, as we discovered
bugs with custom blocks, this straightforward plugin was very helpful in identifying
where the blocks existed across all pages and post types. It allowed us to quickly
identify blocks in multiple sites that needed to be adjusted. With several websites
already live, Block Finder allowed us to find and fix these issues efficiently. 
I would highly recommend this plugin for anyone managing large-scale migrations 
or working with custom blocks.

 [ 阅读所有0条评价 ](https://wordpress.org/support/plugin/block-finder/reviews/)

## 贡献者及开发者

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

贡献者

 *   [ Troy Chaplin ](https://profiles.wordpress.org/areziaal/)

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

[帮助将「Block Finder」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/block-finder)

### 对开发感兴趣吗?

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

## 更新日志

View the full [changelog](https://github.com/troychaplin/block-finder/blob/main/CHANGELOG.md)
on GitHub.

## 额外信息

 *  版本 **1.1.0**
 *  最后更新：**3 周前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 6.4 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  PHP 版本 ** 8.0 或更高版本 **
 *  语言
 * [Dutch](https://nl.wordpress.org/plugins/block-finder/) 、 [English (US)](https://wordpress.org/plugins/block-finder/)、
   [French (France)](https://fr.wordpress.org/plugins/block-finder/) 和 [Italian](https://it.wordpress.org/plugins/block-finder/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/block-finder)
 * 标签
 * [blocks](https://cn.wordpress.org/plugins/tags/blocks/)[gutenberg](https://cn.wordpress.org/plugins/tags/gutenberg/)
   [patterns](https://cn.wordpress.org/plugins/tags/patterns/)[search](https://cn.wordpress.org/plugins/tags/search/)
   [site editor](https://cn.wordpress.org/plugins/tags/site-editor/)
 *  [高级视图](https://cn.wordpress.org/plugins/block-finder/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/block-finder/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/block-finder/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/block-finder/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/block-finder/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/block-finder/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/block-finder/reviews/#new-post)

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

## 贡献者

 *   [ Troy Chaplin ](https://profiles.wordpress.org/areziaal/)

## 支持

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

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