WordPress.com don’t support for code posting on your blog because of potential treat of posting malicious codes. But it supports for code wrapper short code for syntax highlighting (No need to add a plugin for this).
You just have to add your code within below tags. (you should remove spaces I here add them unless it will used as short code)
[ code language="css" ][ / code ]
You can read more about this referring below link.
But main purpose of this blog is to learn how to avoid the know bug which you may often face if you use
for posting your codes.
If you new to WordPress you might not experienced this. So lets look at this bug.
The Above is how you can see when you used
in normal way.
This bug happens because of Calypso editor. The most suitable solution is to avoid usage of Calypso editor and go to classic editor. Normally when you are creating post in Calypso editor. (That fancy looking editor you use to create posts.)
Solution is go through Wp-Admin to create post. I’m using the free blog support given from WordPress.com. So here is the way.
- Log in to wordpress account (You might already logged in)
- Select My Site And Scrol down.
- Then Select WP-Admin
- Select Post and Do your Publishing and Editing task through there.
This will avoid adding unnecessary symbols to your codes.