WordPress For Non-Techies: Free WordPress Tutorials – WPCompendium.org

Code Block

WordPress Gutenberg Blocks – Code

This tutorial is part of our WordPress Gutenberg: The Ultimate Guide For Non-Technical WordPress Users series.

***

Code Block Description

Use the Code Block to display code and code snippets on your site that respect your spacing and tabs.

(Add Codes to WordPress using the Code Block)

How To Use The Code Block

To add a Code Block:

Let’s go through the above steps:

First, create a new post or page or open an existing post or page and either:

Click on the ‘Add Block’ tool and select a ‘Code’ block …

(‘Add Block’ Tool – Add Code Block)

Or, select a Code Block in the Content Area

(Add a Code Block from the Content Area)

After adding a Code Block, you can type or paste in your code…

(Add code to your content using the Code Block)

After adding codes, save, publish, or update your post or page.

How To Edit A Code Block

You can’t edit a Code Block. All you can do with a Code Block is:

Remember to update and publish your post or page to save your settings.

How To Remove A Code Block

To delete or remove a code block:

(Remove a Code Block)

Additionally …

Code Block Tools, Options & Settings

The Code Block includes tools, options, and settings for:

Code Block Editor

(Code Block Editor)

The Code Block Editor includes tools that let you perform the following operations:

Code Block Settings

(Code Block Settings)

Code Block settings include:

Code Block – Additional Info

The Code Block can be converted into the following block types:

(Change Block Type – Code Block)

Additionally:

Installing plugins or themes on on your site may add new functionality, options, or settings to Code Blocks.

***

Congratulations! Now you know how to use the WordPress Gutenberg content editor Code Block.

***

"These tutorials have so much information and are easy to understand. If you use WordPress or plan to in the future these will help you with everything you need to know." - Valisa (Mesa, Arizona)