WordPress replaced the classic editor a few years ago with the Gutenberg block editor. I encourage you to start using it! The original classic editor behaved similarly to a word-processing program: the words and images got placed inside one, long, continuous edit field. With Gutenberg, each type of content has its own block: heads, paragraphs, images, quotes, lists, etc. It’s a more modular system, very flexible and easy to style. In this tutorial, I’ll introduce you to the basic Gutenberg blocks so that you’ll be able to edit existing pages and posts, and create new documents.
The Lay of the Land
Let’s get a sense of where everything is and how to find Gutenberg block-related features and options. At the very top of a post or page (moving from right to left), you’ll find icons for Options (set of 3 vertical dots), Settings (gear), and List View (set of 3 horizontal bars). Getting familiar with each of these will help you feel more comfortable using Gutenberg.
Options (set of 3 vertical dots)
There are 2 important sections: VIEW and EDITOR.
The VIEW section is all about your preferred layout while writing and editing. You can choose where to position the block and document toolbar. Explore all of the options! You can select none, one or multiple combinations. You can change your selection at any time.
- Nothing selected – toolbar sits at the top of the block you are working on
- Top toolbar – sits at the top of the editing area
- Spotlight mode – highlights the block you are working on
- Fullscreen mode – hides the left sidebar (site navigation area)
The EDITOR section lets you edit the entire post or page visually (default) or with code. It’s perfectly fine to just stay with the Visual editor, which displays the content somewhat accurately in terms of size and colors. But, if you are more adventurous, you can switch to the Code editor and change things there. You’ll learn a lot!
Remember, the EDITOR section is for the entire post or page. If you want to view the code for one block only, there’s an option for that in the toolbar called Edit as HTML. We’ll talk more about that later in the tutorial.
The Settings gear offers you the choice of displaying or hiding the right sidebar. The gear toggles “on” and “off”: click once to display, click again to hide. Very simple. There are two tabs in the right sidebar: Post (or Page) and Block.
Right Sidebar: Post (or Page)
The Post/Page tab provides options that pertain to the entire post or page: status and visibility, publishing date, author, permalink, metadata (categories and tags), etc. In addition, plugin areas are displayed in this sidebar.
Right Sidebar: Block
The Block tab is where you find the settings for the specific block you’re working on. So, these settings vary depending on the block that is selected. But, they’re mostly related to styling (color, size, font). HTML anchors and CSS classes can be used in the Advanced section at the bottom of the Settings sidebar.
List View (set of 3 horizontal bars)
The List View is an outline of the content and a super helpful navigational tool. It’s a visual representation of the parent / child / grandchild relationship of the Gutenberg blocks. I’ve found it particularly useful when I need to find a specific block that’s embedded inside another block. Like the Settings (gear) icon, the List View icon is a toggle “on” and “off” switch.
- Hitting the Enter (Return) key will end the current block and generate a new, empty Paragraph block with the prompt “Type / to choose a block“. If you want to stay in the current block, hit Shift/Enter (Return).
- Hovering below an active block will activate the “Add block” plus icon. Clicking on the plus icon opens a menu showing a pared-down set of common blocks.
- Select one of the options or
- Type a keyword inside the “Search” field or
- Click on “Browse all” to see the full list of blocks
- The “Add block” plus icon resides at the top, left side of all document windows. You can always go directly to that symbol, click on it, and see the entire list of blocks. The plus symbol changes to an “x” when the list is displayed, then reverts back to a plus symbol when the list is closed.
This is pretty similar to Add Block, yet a bit more flexible. This tool is accessed via the block Toolbar. Click on the 3 vertical dots and scroll down to “Insert before” or “Insert after“. The new block will be inserted either above or below the current, active block. Sometimes, it’s a little easier to Insert rather than Add.
Common Gutenberg Blocks
Default Gutenberg Block – Paragraph
The Paragraph Block is the default. When you start typing, without designating any kind of block, you’ll be using the Paragraph block. The toolbar offers a standard set of formatting gizmos described in the Basic Ways to Use Gutenberg Blocks > Style section of this tutorial.
The attributes that can be changed in Gutenberg’s right sidebar (Settings > Block tab) are more advanced and include color (for both text and background) and typography (size, weight, lettercase, letterspacing, and Drop caps). Additional modifications can be applied in the Advanced section > Additional CSS class(es).
There are 6 levels of heads. The H1 head is the largest and should only be used for the main heading (title of the page). The heads gradually decrease in size as their tag numbers increase, so that H2 is the second largest, H3 is the third largest, etc. H6 is the smallest. Usually, headings are bold, but the styling depends on the theme.
H2 Heading Example
H3 Heading Example
H6 Heading Example
Once you select the List block, there are 2 kinds of lists to choose from: unordered (bullets) or ordered (numbers). The style of the bullet is theme-dependent (the default is a black circle). You can switch from one kind of list to the other.
- Bullet list item number 1
- Bullet list item number 2
- Bullet list item number 3
- Ordered list item number 1
- Ordered list item number 2
- Ordered list item number 3
I thank you God for this most amazing day, for the leaping greenly spirits of trees, and for the blue dream of sky and for everything which is natural, which is infinite, which is yes.e. e. cummings
The Gutenberg Image block presents 3 ways to insert an image: Upload, Media Library, and Insert from URL. The default alignment is None, which can cause some problems. So, I advise that you choose Align left, Align center, or Align right. Lastly, there is a styling feature for duotones (2-colors). The original image stays intact for use elsewhere. Some very attractive results can be achieved; an example is shown below.
Once you choose from one of the 2 styles for buttons (fill and outline), the toolbar offers the standard formatting gizmos (see Basic Ways to Use Gutenberg Blocks > Style). There is also an assortment of advanced options in Gutenberg’s right sidebar (Settings > block tab).
I like this block a lot, because it makes easy work of page layout and is very adjustable. There are a variety of ways to divide the page width. You could even build columns inside other columns. Mobile responsiveness is built into the code, so the column widths change when necessary on smaller devices.
The spacer block is especially useful when you want to add space above or below a block. Spacing is generally controlled by the theme and the stylesheet. You could, of course, modify the stylesheet. But, the spacer block is a fast way to accomplish what you need without any fuss. The default height is 100px. You can readily adjust the height by dragging the bottom of the spacer block or inputting a new number into the sidebar’s height field.
Basic Ways to Use Gutenberg Blocks
All of the scenarios described below make use of the block toolbar. Select a block to display the toolbar.
For more advanced styling, go to the Settings > block tab area we discussed earlier. Basic styling of individual blocks is available in the tool bar:
- Bold, Italic, and Bold Italic
- Dropdown menu for highlight, inline code, inline image, keyboard input, strikethrough, superscript and subscript
Move Gutenberg Blocks
Moving blocks is really easy with Gutenberg. Use one of 3 methods:
- Press the up or down arrow icon
- Click and drag on the set of 6 dots
- Click on the set of 3 vertical dots and select “Move to“. A bar will appear above the block. Use the up/down arrows ON YOUR KEYBOARD to move that bar. When you arrive at the new position for the block, hit “Enter” key. You can also use “Move to” to active the click and drag technique.
Copy / Duplicate Gutenberg Blocks
These 2 features are accessed via the set of 3 vertical dots. They are similar yet different.
- Copy – copies the block into the clipboard. You then paste (CNTRL-V / CMMD-V) it anywhere you want, in the current document or another page.
- Duplicate – makes an exact copy of the selected block and places it directly underneath the original block.
Edit as HTML
There are a LOT of blocks, but sometimes you just need to use HTML code to tweak something and/or get the right results. You should be familiar with code to use this correctly. If you make a mistake, WordPress will prompt you to “Attempt Block Recovery“. This tool is found under the toolbar’s 3 vertical dots. Situations where you would use the Edit as HTML feature:
- Style a block with multiple classes and/or IDs
- Embed a block within another highly-stylized block
- Use code provided to you by a vendor or developer
You could remove a block the old-fashioned way, by selecting its contents and hitting “Delete”. Or you could, instead, select the block you want to remove, click on the 3 vertical dots at the end of the toolbar, scroll down to and click “Remove xyz (name of block)“.
Change Block Type or Style
This is a limited feature and works only with a few blocks. To transform a block into a different kind of block, click on identifier symbol on the left side of the toolbar. The dropdown list of items you can transform to varies, depending on the current block. You may need to just add or insert a new block, then copy and paste what you want to clone.
Publish Your Post (or Page)
When you are finished creating your post (or page), it’s time to publish! It’s a 3-step process:
- Click the “Publish” button on the top-right of the screen
- A checklist will pop in from the side of the screen. Make your selections.
- Visibility: Public, Private, Password Protected
- Publish: Immediately (default) or schedule a date
- Click the “Publish” button on the pop-in checklist
If you prefer, you can watch the video tutorial I made that shows all of the features and tools discussed in this blog post:
Beginner’s Guide to Gutenberg Blocks
July 26, 2022 • 6-8 PM EST
Anne is presenting this topic at the WordPress July “Mega Meetup”,
sponsored by So. Florida WordPress Meetup
RSVP and details are on the MeetUp site:
WordPress July “Mega Meetup” – Block Intro & Project Frameworks