How to add formated code in a WordPress post

If you want to add lines of code in your blog entry, you will need to use shortcodes, such as:

[code language="css"]
your code here
[/code]

The list of supported language can be seen at http://en.support.wordpress.com/code/posting-source-code/

If you are hosted on wordpress.org, then it’s fine, but if you are selfhosted this shortcodes won’t work until you download this plugin which is used on the wordpress.com site.

I hope this will help you to write well formated posts.

Posted in Wordpress Tagged with:

Leave a Reply