为了帮助简化站点创建和编辑,WordPress版本5.0从其传统的Tinymce编辑器转移到内容块 - 单独的,可自定义的元素,这些元素代替了标准文本和图像编辑框架。

虽然新系统旨在易于使用和简单应用,但如果您熟悉以前的迭代,则可能会令人震惊WordPressor have no prior experience with this content management system. Here’s what you need to know about the integration, implementation, and impact of content blocks in WordPress.

使用HubSpot的WordPress网站来发展业务

WordPress中的内容块是什么?

official WordPress support page, content blocks “are the components for adding content in the WordPress block editor.” This editor replaces the more familiar TinyMCE editor used by previous WordPress versions with the goal of making the post and page design simpler, easier, and more customizable.

WordPress中有各种各样的内容块,包括:

  • 档案
  • 博客文章
  • 日历
  • Code
  • 标题
  • 图片
  • 导航
  • Podcast player
  • 垫片
  • Timeline

Specific service integrations are also supported with blocks for Twitter, TikTok, YouTube, and WhatsApp.

The biggest change here is the segmentation of individual WordPress elements. While the classic editor saw site owners managing and manipulating all content types on a single, shared page, block-based editing gives every piece of content its own customizable container.

What are WordPress Gutenberg Blocks?

WordPress Gutenberg blocks are the same as WordPress content blocks.“ Gutenberg”是新的WordPress编辑器的名称与2018年12月的5.0版更新一起部署,重点介绍了网站创建的视觉方面,而不是先前编辑器迭代的更令人困惑和复杂的基于文本的方法。

实际上,古腾堡提供的外观与Tinymce编辑器的外观截然不同。这是以前的编辑:

Adding a new post in TinyMCE editor in earlier version of WordPress

And here’s the Gutenberg version:

在Gutenberg编辑器中添加最新版本的WordPress帖子

虽然这是一个更干净的设计,但真正突出的是“标题”字段作为自己的块。下面没有文本字段 - 要创建和编辑文本,您需要添加一个文本块。想要图像吗?放入图像块中。每种块类型都提供自己的自定义;可以将标题粗体或斜体化,而对齐和间距可以在柱子中进行调整。可以在许多配置中添加多个图像,您可以自定义文本和背景颜色。

Although the style of the new editor takes some getting used to, it’s largely unobtrusive. Creating title and post text isn’t significantly different than in the old editor, and you can quickly search for specific block types if you’re not sure what to use. In fact, for most common use cases you can effectively ignore the Gutenberg editor and create content as normal —blocks only impact your work if you’re looking to implement specific features or customize the look of your site.

How to Disable Blocks in WordPress

What happens if you really, really dislike the new Gutenberg content block editor? Some users do — before its wide release in 2018 there were complaints about it not being ready for large-scale deployment, and it’s true that in some cases what site owners want to do with content blocks isn’t immediately obvious or intuitive. It’s also true that some必须使用WordPress插件和附加组件可能不玩古腾堡,especially if software creators haven’t gotten around to updating their code.

无论哪种情况,如果您的网站根本不适用于WordPress内容块或您不喜欢该方法 - 您可能希望禁用WordPress中的块。如果有的话,这将帮助您防止头痛WordPress视觉编辑器不起作用。

While you can’t switch back to the classic editor directly from your WordPress administrator page, several plugins offer this functionality.

Classic Editor

As soon as this plugin is installed, it deactivates the Gutenberg content editor and restores the classic version. It also offers the ability to keep both classic and Gutenberg options simultaneously — if you activate this option, content blocks will be displayed by default but include links back to the classic editor

禁用Gutenberg

默认情况下,此插件可为WordPress网站上的所有管理员和用户禁用Gutenberg块编辑器,但是可以通过在插件设置菜单中取消选中“完整禁用”选项来自定义。这将打开许多基于角色的编辑器选项,使您可以为管理员,编辑,作者,贡献者,订阅者和客户激活Guternberg或经典编辑功能。

How to Put WordPress Blocks Side-by-Side

尽管内容块编辑器的设计是为了简单和速度,但某些功能并不容易发现。考虑并排放置图像块的过程。鉴于新编辑器的基于块的性质,这应该很容易,对吗?只需拖放图像,您希望它们在页面上,然后转到下一个内容元素。

Not so fast. As it turns out, this is an often-asked question on WordPress support sites since the Gutenberg editor doesn’t offer this function up-front. Here’s a step-by-step guide:

步骤1:单击“+”以添加新块

Step 2: Search for “Gallery Block”

Step 3: Add images

Step 4: Customize conditions

Let’s explore each in more detail.

步骤1:单击“+”以添加新块.

单击加上图标以在WordPress编辑器中添加新块

虽然WordPress默认为“添加标题”,但单击“+”将带来许多可以使用的块选项来自定义页面。

步骤2:搜索“画廊块”。

用户在WordPress仪表板中搜索特定的Gutenberg块

Here, you can either use a keyword search or browse all blocks to find what you’re looking for. In this case, you’ll want the “Gallery” block.

Step 3: Add images.

User adding image block in WordPress dashboard

画廊块使您可以上传新图像或从设备库中选择它们。您还可以将拖放图像拖入图库块本身,而不是选择和上传特定的文件。

步骤4:自定义条件。

用户自定义WordPress仪表板中的图像块

上传或拖动到同一画廊块的图像自然会并排出现。块上方的选项栏使您可以选择显示图像的方式(例如,您可以选择堆叠,偏移或列),而屏幕右侧的设置栏可让您控制多少张图像显示在每一行,最多四个。

值得注意?WordPress自然会裁剪图像,但是您可以在设置栏中关闭此选项。

建筑模块

If you’rebuilding or redesigning a WordPress site, the initial appearance of its block-based content editor can be a bit jarring. Despite the shift away from more familiar, text-based editing however, content blocks offer powerful, customizable features and functions to help streamline site design and deployment.

使用WordPress网站上的HubSpot工具,并在不处理代码的情况下连接两个平台。点击这里了解更多。

使用WordPress网站上的HubSpot工具,并在不处理代码的情况下连接两个平台。点击这里了解更多。

最初发布于12月24日,2020年12月7:00 am,更新于2021年3月17日

Topics:

WordPress Website