1. Home
  2. WordPress
  3. WordPress Admin Editor
  4. Classic Editor
  5. Classic Editor: Formatting Code in WordPress Posts

Classic Editor: Formatting Code in WordPress Posts

Distinguishing the difference between regular text and code can be very helpful in technical articles. You can also change WordPress fonts and headings to help clarify sections.

If you are using the Gutenberg Editor, see the Gutenberg Editor: Formatting Code in WordPress Posts article.

Formatting Code in WordPress Posts

  1. Open a post or create a new one
  2. Select the text you would like to format as code
  3. Click the text type box next to the plus buttontext type box location photo
  4. Select Preformatted from the drop-downPreformatted drop down location photo

This will change your selected text to display as a single line of “Preformatted” text in the editor. If you want to see what this will look like in a published post, click Preview.Preview button location photo

 

This will display a preview of what the published post will look like.preview photo showing preformatted text and regular text

 

Updated on November 7, 2018

Was this article helpful?

Related Articles