Most WordPress users spend their blogging life in the Visual Editor, the WYSIWYMG editor. Yes, it is the What You See is What You MIGHT Get editor.
While WordPress does what it can to make the Visual Editor emulate what your content will look like once published within your WordPress Theme, it has limits.
One of the limits is that is appears hard to publish HTML in a blog post. It isn’t. You just need to switch to the HTML or Text Editor on the Post/Page Panel.
Before you can publish code on your WordPress blog, there are some things you must know.
- WordPress automatically fixes poorly formed code. If you mess up a link or HTML element, WordPress doesn’t recognize it as properly formed code so it will “fix” it for you by replacing < with < or change other code to make it appear as text.
- WordPress automatically strips out unwanted or broken code. If you are on WordPress.com, you are not permitted to publish JavaScript, PHP, or other code within your blog posts or elsewhere. But you can publish HTML if you have written it properly in the HTML/Text Editor.
- The WordPress Visual Editor expects everything within it to be publishable text or a shortcode, code that displays video and other media or features.
- The WordPress HTML/Text Editor expects everything within it to be HTML or something WordPress can use to generate HTML.
- WordPress recently changed the name of the HTML editor to Text editor in WordPress.com. This change may be in an upcoming release of WordPress.
There are 66 HTML codes permitted in WordPress posts, Pages, and widgets, codes you can use to make lists, links, blockquotes, images, headings, whatever content you wish to add to your site. Continue reading