Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it at all possible to display HTML code in Wordpress?

Tags:

html

wordpress

I have tried countless plugins, codyfying HTML with escape keys, and my blood is beginning to boil. Switching between Visual and HTML mode is actually changing my content, ie destroying it!!!

like image 406
Oliver Watkins Avatar asked Dec 21 '12 14:12

Oliver Watkins


People also ask

Can you see the HTML code in WordPress?

If you're using the WordPress classic editor, then you can easily edit the HTML in the Text view. To access the Text view, simply edit a blog post or add a new one. When you're in the classic editor, click the 'Text' tab to see the HTML of your article.


1 Answers

OK, i figured out what to do.

  1. First go into visual mode.
  2. Select Preformatted in the formatting drop down. A little grey box is created.
  3. Inside the grey box, copy and paste your raw HTML.

Save it and switch from visual to HTML views a few times. There should be no mangling.

IT IS ABSOLUTELY CRUCIAL that you paste into visual tab, instead of in the text tab, or it will get stuffed up completely (very unintuitive. You would think it would work the other way araound).

like image 148
Oliver Watkins Avatar answered Oct 25 '22 22:10

Oliver Watkins