How to post code in your Wordpress post
July 9, 2006
An issue for many people. They like to have some code example displayed in their Wordpress posts. You can do it manually without the use of a plugin. Follow the link Users form the Admin backend and you will get: Your Profile and Personal Options. You need to disable visual rich editor when writing.
The following step will be that you encode your code example. Use Pre or Code tags to wrap your code in and avoid using target=”_blank”. You should get something like this:
<object type=”application/x-shockwave-flash”
data=”folder/yourfile.swf” width=”xxx” height=”xxx”>
<param name=”movie” value=”folder/yourfile.swf” />
</object>
Use < for < less-than sign
Use > in stead of > greater-than sign
And & for & ampersand.