How to post code in your Wordpress post

July 9, 2006

Filed under: Blogging, WordPress — Rxbbx @ 10:14 am

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 &lt; for < less-than sign
Use &gt; in stead of > greater-than sign
And &amp; for & ampersand.

No Comments »

Permanent Link

No comments yet.

Leave a comment