Title: GenerateBlocks
Author: Tom
Published: <strong>2020 年 5 月 19 日</strong>
Last modified: 2026 年 10 月 13 日

---

搜索插件

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

![](https://ps.w.org/generateblocks/assets/icon.svg?rev=3744275)

# GenerateBlocks

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

[下载](https://downloads.wordpress.org/plugin/generateblocks.2.5.0.zip)

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

 [支持](https://wordpress.org/support/plugin/generateblocks/)

## 描述

Add incredible versatility to your editor without bloating it with tons of one-dimensional
blocks. With GenerateBlocks, you can learn a handful of blocks deeply and use them
to build anything.

[GenerateBlocks](https://generatepress.com/blocks?utm_source=wp-repo&utm_medium=link&utm_campaign=readme)
works hand-in-hand with [GeneratePress](https://generatepress.com/theme?utm_source=wp-repo&utm_medium=link&utm_campaign=generateblocks-readme),
but is built to work with any theme.

Looking for more features? Check out [GenerateBlocks Pro](https://generatepress.com/blocks?utm_source=wp-repo&utm_medium=link&utm_campaign=readme).

#### Container

将您的内容组织成行和小节。容器区块是您内容的基础，让您能够为自己的内容设计独特的
部分。

#### Grid

用灵活的网格创建高级布局——网格区块让您能够创建您能想到的任何一种布局。

#### Text

用先进的排版技术制作丰富的文字内容——从标题到段落 – 完全控制您的文字。

#### Button

用漂亮的按钮进行转换。

#### Query

Build a list of posts from any post type using advanced query parameters. Query 
post meta and option fields in GenerateBlocks Pro.

#### Image

Add images to your content to make a visual statement.

#### Shape

Add custom SVG shapes to your pages with ease.

#### Dynamic Tags

Use our powerful dynamic tags to display dynamic content inside your blocks.

 * Post title
 * Post excerpt
 * Post permalink
 * Post date
 * Featured image
 * Post meta
 * Author meta
 * Comment count
 * Comments URL
 * Author archives URL
 * Author avatar URL
 * Term list
 * Previous posts URL
 * Next posts URL
 * Media

In GenerateBlocks Pro, you get additional dynamic tags:

 * Archive title
 * Archive description
 * Site option
 * Term meta
 * User meta
 * Current year
 * Site title
 * Site tagline
 * Loop index number
 * Loop item

#### Performance

我们认真对待性能。只会为所需的区块生成最少的 CSS ，我们的 HTML 结构也会尽可能简洁，
同时保持最佳的灵活性。

#### Coding standards

采用最高编码标准构建，以确保安全性、稳定性和未来兼容性。

#### Fully responsive

Style your blocks for different screen sizes.

 * Desktop: @media (min-width:1025px)
 * Desktop & Tablet: @media (min-width:768px)
 * Tablet: @media (max-width:1024px) and (min-width:768px)
 * Tablet & Mobile: @media (max-width:1024px)
 * Mobile: @media (max-width:767px)

In GenerateBlocks Pro, you can create as many custom media queries as you need.

#### Documentation

Check out our [documentation](https://learn.generatepress.com/) for more information
on the individual blocks and how to use them.

## 区块

该插件提供了 9 个区块.

 *   容器 An HTML element that you can add blocks inside of.
 *   Image A self-closing media element.
 *   Shape A custom SVG shape.
 *   Page Numbers Display page numbers for a paginated query loop.
 *   Text A text element where you can choose your own tag name, content, and styles.
 *   Query Query posts and display them in a loop.
 *   No Results Display blocks when your query has no results.
 *   Looper Loops its children based on the data provided by the Query block.
 *   Loop Item The item that is looped inside of the Looper.

## 安装

有两种方法可以安装 GenerateBlocks。

 1. 转到仪表盘菜单下的“插件>安装插件”页面，并搜索“GenerateBlocks”
 2. 从 WordPress.org 下载 .zip，并通过 FTP 将该文件夹上传到`/wp-content/plugins/`目录。

In most cases, #1 will work fine and is way easier.

## 常见问题

### 我如何将你们的区块添加到我的页面？

 * 创建新页面或文章
 * 添加新区块并找到 “GenerateBlocks” 分类。
 * 选择您的区块并开始构建。
 * 建议从容器区块开始入手。

### 我应该用什么主题？

GenerateBlocks was built to work hand-in-hand with [GeneratePress](https://generatepress.com).
However, it will work with any theme you choose.

### Where do I report security bugs found in this plugin?

Please report security bugs found in the source code of the GenerateBlocks plugin
through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/3910aedb-3fe0-4221-8b1e-ff4e4aea3495).
The Patchstack team will assist you with verification, CVE assignment, and notify
the developers of this plugin.

## 评价

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

### 󠀁[Great Plugin](https://wordpress.org/support/topic/not-completely-translatable-2/)󠁿

 [NagaTheme](https://profiles.wordpress.org/nagatheme/) 2026 年 8 月 20 日 1 回复

Great Plugin

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

### 󠀁[Generate Bocks](https://wordpress.org/support/topic/generate-bocks/)󠁿

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

I build WordPress sites for clients and have tested most of the major page builders
on real projects: Elementor, Divi, Beaver Builder, and the newer Gutenberg stacks.
GenerateBlocks is the one I now reach for first, for two reasons. First, what it
sends to the browser. Instead of loading a page-wide framework, jQuery, and icon
and slider bundles on every page, it generates only the CSS the page uses and builds
on native Gutenberg blocks. The output is clean markup with far less HTML, CSS, 
and fewer requests than the heavyweight builders. Because it stays close to standard
WordPress, caching and CDNs work with it cleanly instead of fighting builder quirks.
Second, the Query Loop. You design a template once (a card, a listing, a team member)
and repeat it across a live query of your content, bound to dynamic data. That covers
custom archives and listings that used to need a hand-written PHP template, without
adding weight. I rebuilt a client site entirely in GenerateBlocks, dynamic listings
included. Lighthouse desktop came back at 97 Performance, 91 Accessibility, 100 
Best Practices, and 100 SEO, with Core Web Vitals in the green. That was close to
out of the box, not the result of a heavy optimisation pass, because the foundation
is light to begin with. For client work where performance and maintainability matter,
it is the best builder I have used.

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

### 󠀁[Great gutenberg based page builder](https://wordpress.org/support/topic/great-gutenberg-based-page-builder/)󠁿

 [Quentin Le Duff (–Q–)](https://profiles.wordpress.org/quentinldd/) 2026 年 7 月
7 日 2 回复

Awesome companion for Generatepress, a tiny collection for all purpose!

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

### 󠀁[Perfect tool](https://wordpress.org/support/topic/perfect-tool-160/)󠁿

 [fkoomek](https://profiles.wordpress.org/fkoomek/) 2025 年 9 月 18 日 1 回复

Perfect. I don't use anything else to build sites anymore. It's more developer tool
because good knowledge of CSS is necessary but you can build fast sites just with
the assets you need. No more unused kilobytes of CSS code. My favorite approach 
is to use Twenty Twenty Five theme, unregister all styles and then build all parts
of the site from scratch with generateblocks.

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

### 󠀁[Simply The Best](https://wordpress.org/support/topic/simply-the-best-728/)󠁿

 [Claus](https://profiles.wordpress.org/taruk/) 2025 年 9 月 11 日 1 回复

Using it since years on many sites. Valuable support. Great. Thank you!

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

### 󠀁[Perfect Gutenberg addon](https://wordpress.org/support/topic/perfect-gutenberg-addon/)󠁿

 [yodastudio](https://profiles.wordpress.org/yodastudio/) 2025 年 9 月 4 日 1 回复

This is a pretty useful tool. I can create fancy pages without using other powerful(
but heavy) WordPress editors.I could redo a good portion of my sites using just 
Gutenberg and this addon, and they would be much lighter.

 [ 阅读所有122条评价 ](https://wordpress.org/support/plugin/generateblocks/reviews/)

## 贡献者及开发者

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

贡献者

 *   [ Tom ](https://profiles.wordpress.org/edge22/)

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

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

### 对开发感兴趣吗?

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

## 更新日志

#### 2.5.0

 * Feature: Redesign the Settings page with the GeneratePress design system
 * Feature: Allow the global container width to be managed as a Design Token in 
   GenerateBlocks Pro 2.8.0
 * Feature: Add the generateblocks_default_at_rules PHP filter to define the at-
   rule presets offered by the Styles Builder
 * Tweak: Always embed page-local block CSS inline and retire its print-method setting,
   filters, and regeneration endpoint
 * Tweak: Update the color picker with support for OKLCH-based color mixing
 * Tweak: Open the Pattern Library from the editor toolbar or Options menu instead
   of the GenerateBlocks sidebar (requires GenerateBlocks Pro 2.8.0 when Pro is 
   active)
 * Tweak: Isolate pattern library previews in a sandboxed frame with its own security
   policy
 * Tweak: Enforce the editor Query Loop posts cap server-side
 * Tweak: Keep dismissed event handler notices hidden for the rest of the editing
   session
 * Fix: Pattern library crash in cross-origin isolated editors
 * Fix: Re-fetch pattern library data automatically when a host’s object cache evicts
   part of the cached set
 * Fix: Detect dynamic data markers written with escaped JSON when validating saves
 * Fix: Fully strip suppressed dynamic tags when a link-prefixed copy of the same
   tag exists
 * Fix: Event handler notices not appearing for GenerateBlocks Pro blocks
 * Fix: Text and Query Page Numbers blocks losing focus when first inserted
 * Fix: PHP fatal error when rendering a third-party dynamic tag registered without
   a supports key
 * Fix: Editor ordering block CSS media queries differently than the frontend
 * Fix: @supports and @container rules not keeping their authored order in block
   CSS
 * Fix: Custom property names losing their capital letters in block CSS

#### 2.4.1

 * Fix: Editor crash when opening the pattern library on WordPress 7.1 with cross-
   origin isolation enabled

#### 2.4.0

 * Security: Escape dynamic tag replacements inside HTML attributes
 * Feature: Add block inspector slot support for the new Editor Access feature in
   GenerateBlocks Pro
 * Feature: Add content-only and read-only support to our blocks
 * Tweak: Users without dynamic data permissions can no longer add or save new dynamic
   data
 * Tweak: Dynamic data no longer renders on pages last saved by a user without dynamic
   data permissions
 * Tweak: Dynamic tags no longer resolve inside inline event handler attributes (
   onclick, onmouseover, etc.)
 * Tweak: Add generateblocks_allow_dynamic_data_in_event_handlers filter
 * Tweak: Add editor notices when a save disables or re-enables dynamic data
 * Tweak: Improve permissions around dynamic data previews, metadata lookups, and
   query controls
 * Tweak: Refresh the dashboard header design
 * Tweak: Raise the minimum supported WordPress version to 6.7

#### 2.3.0

 * Security: Harden legacy dynamic URL output
 * Feature: Add support for new Dev Tools feature in Pro
 * Feature: Add support for direct CSS editing feature in Pro
 * Feature: Add Set/Replace media block toolbar button
 * Tweak: Improve Image block selection behavior in editor
 * Tweak: Disable core Additional CSS field on GenerateBlocks blocks
 * Tweak: Add generateblocks_enable_core_additional_css filter

#### 2.2.1

 * Security: Improve dynamic tag replacement security in the editor

#### 2.2.0

 * Security: Improve REST endpoint access control
 * Security: Add dynamic tag validation middleware to stop unsafe meta references
   during save
 * Feature: Add `generateblocks.media.imageAttributes` filter to control Media block
   auto-populated attributes
 * Feature: Add grid-auto-columns field to Styles Builder
 * Feature: Add grid-auto-rows field to Styles Builder
 * Feature: Add grid-template-areas field to Styles Builder
 * Feature: Add grid-area field to Styles Builder
 * Feature: Add text-wrap field to Styles Builder
 * Feature: Add global CSS values (inherit, initial, revert, revert-layer, unset)
   to SelectControl components
 * Fix: Editor sidebar header alignment
 * Fix: Search controls input styles in WordPress 6.9
 * Fix: Undo behavior in editor when editing styles
 * Fix: Unique ID regeneration when pasting a block before its original
 * Fix: Block HTML attribute escaping in WordPress 6.9
 * Tweak: Show standard icons in all libraries
 * Tweak: Show compound selector symbol in Styles Builder list
 * Tweak: Enforce template selector sizing overrides

#### 2.1.2

 * Security: Restricted options REST API endpoint access for contributors/editors

#### 2.1.1

 * Security: Remove sensitive values from REST API response for logged in users
 * Fix: Disable image links in the editor
 * Fix: Parse shortcodes in URL HTML attribute fields
 * Fix: Keep existing image size when changing image in block
 * Tweak: Improve image size field loading UI

#### 2.1.0

 * Feature: Enable full iframe editor
 * Feature: Improve styles builder indicator dot system
 * Feature: Add `static` value to the “Position” control
 * Feature: Add `aria-label` field to all blocks
 * Feature: Add `inline-grid` option
 * Feature: Add inherited values as placeholders
 * Fix: Missing “current parent” query parameter
 * Fix: Fallback preview support in color picker
 * Fix: Inability to type some units in the `UnitControl`
 * Fix: Block/pattern preview styles
 * Fix: IME issues with multi-select component
 * Fix: Border sync button alignment in v1 blocks
 * Fix: Single comment count option key in dynamic tags
 * Fix: Custom at-rule switching in the editor
 * Fix: Font family filter in the styles builder
 * Fix: `UnitControl` values starting with a dash
 * Fix: Image block selection in WP 6.8
 * Fix: Dynamic tag parsing all blocks in Container at once
 * Fix: Allow 0 as nested post meta key
 * Fix: Ensure block style assets load in wp_head
 * Fix: Dimension control tab order
 * Fix: Conditional loading of instant pagination script
 * Tweak: Improve editor performance
 * Tweak: Always show popular user meta fields in dropdown
 * Tweak: Add support for device visibility feature in Pro
 * Tweak: Add `generateblocks_use_v1_blocks` filter
 * Tweak: Improve default styles builder selectors/shortcuts
 * Tweak: Load permissions earlier in the editor
 * Tweak: Improve block keywords
 * Tweak: Sanitize block ID attribute value
 * Tweak: Allow the `download` attribute to have a value
 * Tweak: Add searching notice to styles builder
 * Tweak: Add `generateblocks_block_css` filter
 * Tweak: Add `generateblocks_process_block_css` action
 * Tweak: Add default `alt` tag to images

#### 2.0.2

 * Fix: Image block selection in WP 6.8

#### 2.0.1

 * Fix: WordPress.org zip package issue

#### 2.0.0

 * Security: Prevent logged-in contributors from querying private post content
 * New: All blocks re-written from scratch for better performance and control
 * New: Version 1 blocks still exist where used and function normally
 * New: Version 1 blocks can be enabled by default with simple filter
 * New: Element block – replaces the Container and Grid blocks
 * New: Element blocks comes with Container and Grid variations in the block inserter
 * New: Text block – replaces the Headline and Button blocks
 * New: Text blocks comes with Headline, Text, and Button variations in the block
   inserter
 * New: Query block – replaces the Query Loop block
 * New: Looper block – replaces the Grid block inside of the Query block
 * New: Loop Item block – replaces the Post Template (Container) in the Query block
 * New: No Results block – add content that displays if no Query results are found
 * New: Page Numbers block – add page numbers for pagination in your Query block
 * New: Shape block – add any SVG shape to your pages
 * New: Media block – replaces the Image block
 * New: Local blocks now have the full styles builder found in GB Pro Global Styles
 * New: Local blocks can now be designed at any breakpoint or nested rule
 * New: Filter block design options in the editor based on whether they have a value
 * New: Filter block design options in the editor based on whether they’re inheriting
   a value
 * New: Dynamic tags system. Insert dynamic data anywhere in your blocks
 * New: Multiple dynamic tags can be inserted into a single block
 * New: –gb-container-width CSS variable for getting the global max-width
 * Performance: Local blocks now generate their CSS and HTML as you build in the
   editor
 * Performance: Blocks are output as static HTML/CSS on the frontend for better 
   performance

Full changelog can be found [here](https://generatepress.com/category/changelog/).

## 额外信息

 *  版本 **2.5.0**
 *  最后更新：**3 周前**
 *  活跃安装数量 **200,000+**
 *  WordPress 版本 ** 6.7 或更高版本 **
 *  已测试的最高版本为 **7.1.4**
 *  PHP 版本 ** 7.2 或更高版本 **
 *  语言
 * [Catalan](https://ca.wordpress.org/plugins/generateblocks/) 、 [Chinese (China)](https://cn.wordpress.org/plugins/generateblocks/)、
   [Czech](https://cs.wordpress.org/plugins/generateblocks/) 、 [Dutch](https://nl.wordpress.org/plugins/generateblocks/)、
   [English (US)](https://wordpress.org/plugins/generateblocks/) 、 [Finnish](https://fi.wordpress.org/plugins/generateblocks/)、
   [French (France)](https://fr.wordpress.org/plugins/generateblocks/) 、 [Galician](https://gl.wordpress.org/plugins/generateblocks/)、
   [German](https://de.wordpress.org/plugins/generateblocks/) 、 [Italian](https://it.wordpress.org/plugins/generateblocks/)、
   [Japanese](https://ja.wordpress.org/plugins/generateblocks/) 、 [Persian](https://fa.wordpress.org/plugins/generateblocks/)、
   [Portuguese (Brazil)](https://br.wordpress.org/plugins/generateblocks/) 、 [Russian](https://ru.wordpress.org/plugins/generateblocks/)、
   [Serbian](https://sr.wordpress.org/plugins/generateblocks/) 、 [Spanish (Chile)](https://cl.wordpress.org/plugins/generateblocks/)、
   [Spanish (Colombia)](https://es-co.wordpress.org/plugins/generateblocks/) 、 
   [Spanish (Ecuador)](https://es-ec.wordpress.org/plugins/generateblocks/) 、 [Spanish (Mexico)](https://es-mx.wordpress.org/plugins/generateblocks/)、
   [Spanish (Spain)](https://es.wordpress.org/plugins/generateblocks/) 、 [Spanish (Venezuela)](https://ve.wordpress.org/plugins/generateblocks/)
   和 [Swedish](https://sv.wordpress.org/plugins/generateblocks/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/generateblocks)
 * 标签
 * [blocks](https://cn.wordpress.org/plugins/tags/blocks/)[editor](https://cn.wordpress.org/plugins/tags/editor/)
   [gutenberg](https://cn.wordpress.org/plugins/tags/gutenberg/)[page builder](https://cn.wordpress.org/plugins/tags/page-builder/)
   [posts](https://cn.wordpress.org/plugins/tags/posts/)
 *  [高级视图](https://cn.wordpress.org/plugins/generateblocks/advanced/)

## 评级

 4.9 星（最高 5 星）。

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

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

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

## 贡献者

 *   [ Tom ](https://profiles.wordpress.org/edge22/)

## 支持

最近两个月解决的问题：

     总计 6，已解决 3

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

## 捐助

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

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