WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to wordpress and I just created a new blog(free version). Now It seems that code fromat doesn't work. All lines are aligned to the left. Please look at the image below.



share|improve this question
up vote 0 down vote accepted

You need to wrap your code in either code or pre tags. code is for when inline code in a sentence e.g. include("hello.php") whereas pre is for preformatted blocks of text e.g.:

function hello_world(){
    echo 'hello world';

For code highlighting etc, you'll need to look for plugins.

The easiest way of using these tags is using the preformatted style:

enter image description here

share|improve this answer
In HTML(not Visual), I added code tag but no luck. – Love Jul 6 '12 at 14:59
That won't work, for example if I look at your screenshot I see you trying to use <code> for a block of code, which is not the correct usage at all. Reread my answer. Use <pre> – Tom J Nowell Jul 6 '12 at 15:02
There is no pre tags on the menu, should I type in manually? – Love Jul 6 '12 at 15:06
You can type it in manually, or in the styles dropdown, choose preformatted, see my answer for a screenshot – Tom J Nowell Jul 6 '12 at 15:29
If I choice a plugin, how to? I downloaded one to my C drive, but where is the good place for it? – Love Jul 6 '12 at 15:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.