• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • iPhone
  • Office
  • Google
  • Windows & Mac
  • Apps & Devices
  • WordPress
  • All guides
Home/WordPress/How to Switch to the Code Editor in WordPress
WordPress

How to Switch to the Code Editor in WordPress

By Matthew Burleigh · Updated June 11, 2019 · 1 min read

The Gutenberg editor introduced in WordPress 5.0 made it much easier to add elements to your posts. Whether you want to embed a YouTube video, a form, a table, or one of many other types of content, there is probably a block that you can add to do so easily.

But occasionally you may actually need to add some HTML code to one of your posts, and you might find that it’s difficult to do what you are trying to accomplish. Fortunately there is a Code Editor in Gutenberg that you can enable which allows you to type HTML directly into your post.

How to Enable the Code Editor in Gutenberg for WordPress

The steps in this article were performed on a site using WordPress 5.2.1. This guide assumes that you are using the Gutenberg editor on your site.

Step 1: Sign into the admin section of your site at (yourdomain.com)/wp-admin.

Step 2: Hover over the Posts tab and either create a new post or open an existing one.

open the posts menu

Step 3: Click the Show more tools & options button (the one with three vertical dots) above the column at the right side of the window.

show more tools and options

Step 4: Select the Code Editor option from the menu.

how to enable the code editor in wordpress

Note that you can also use the keyboard shortcut Ctrl + Shift + Alt + M to toggle the Code Editor on and off.

Do you need to link to a specific spot in one of your posts? Find out how to easily create and use HTML anchors with the Gutenberg WordPress editor.

Matthew Burleigh
Matthew Burleigh

Matt has been working with WordPress and creating content using this powerful content management system for years. While he has written about many other tech topics, WordPress is one of his favorites.

You can read his full bio here.

Join Our Free Newsletter

iPhone & tech guides

You may opt out at any time.
Read our Privacy Policy

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Pinterest (Opens in new window) Pinterest

Related

More WordPress guides

  • How to Edit Footer in WordPress
  • How to Add a Search Bar in WordPress
  • How to Add Ads.txt File in WordPress for AdSense Success
  • How to Create a WordPress Contact Us Page
  • How to Delete a WordPress Blog
See all WordPress guides

Primary Sidebar

Join Our Free Newsletter

iPhone & tech guides

You may opt out at any time.
Read our Privacy Policy

Recent Posts

  • How to Use Safety Check on iPhone
  • How to Schedule an Email in Gmail
  • How to Use Hold Assist on iPhone
  • How to Use the Accessibility Checker in Word
  • How to Use the Journal App on iPhone

Site Info

  • Domain Name - Hostgator
  • Hosting - Cloudways
  • Theme Framework - Genesis
  • Child Theme - Smart Passive Income Pro
  • Site Speed - WP Rocket

Archives

  • November 2026
  • April 2026
  • March 2026
  • February 2026
  • January 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • June 2024
  • May 2024
  • December 2023
  • November 2023
  • October 2023
  • November 2022
  • October 2022
  • May 2022
  • July 2020
  • September 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • July 2018
  • December 2016
  • November 2016

Categories

  • Apps & Devices
  • Comments
  • Genesis
  • Getting Started
  • Google
  • Hosting
  • iPhone
  • Jetpack
  • Microsoft Office
  • Navigation
  • Plugins
  • Settings
  • Sidebar
  • Themes
  • Windows & Mac
  • WordPress
  • Writing

Clear, step-by-step answers for iPhone, Office, Google, Windows, Mac and WordPress. Find your problem, follow the steps, get back to what you were doing.

Topics

  • iPhone
  • Microsoft Office
  • Google
  • Windows & Mac
  • Apps & Devices
  • WordPress
  • All guides

WordPress

  • Getting Started
  • Writing
  • Settings
  • Navigation
  • Jetpack
  • Themes

Company

  • Affiliate Disclosure
  • Privacy Policy
  • FAQ
  • About
  • Contact

© 2026 Answer Your Tech. Not affiliated with Apple, Microsoft, Google or WordPress. All trademarks belong to their owners.

Loading Comments...

You must be logged in to post a comment.