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 have my blog hosted at www.alphaot.com and I guess it's good enough. But problems arise when the lines of code get longer than 30 characters. The lines just wrap and get icky or something they even don't wrap!

In your experience what's a great WordPress theme for a developers blog to post code to?

Also, I'm using Windows Live Writer, any extensions for code publishing you would recommend?


More than plugins, I'm interested on a clean, free wordpress theme that is WIDE so the code doesn't have to be wrapped.

share|improve this question

closed as off-topic by gmazzap, birgire, ialocin, kaiser Aug 4 '14 at 14:28

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Sizes are relative. For examle, you can set the font-size of the <pre> tags to 10%. That would make the source code that small it would fit into even a small theme. What I want to say: How wide should your blog be? for up to 100 chars per sourcecode-line? – hakre Nov 7 '10 at 1:09
@hakre: Yeah that sounds about right, 100 chars poer line – Serg Nov 7 '10 at 1:12
That's pretty wide. You might probably want extend and existing one (probably Sandbox) for your needs if the current answers are not helping you. I can suggest to make use of the SyntaxHighlighter Evolved (Wordpress Plugin), it works well with the twenty-ten theme. I place an example at the website you linked above. – hakre Nov 7 '10 at 1:30

I would suggest that you flip the question to What plugin is good for posting code?. You can only do so much with <pre> and <code> HTML tags. I post code snippets on my blog all the time using the WP-Syntax plugin. Here's a nice working example:

A WordPress Blog Post with PHP, TXT and HTML snippets using the WP-Syntax Plugin

It allows me to identify the code I post as CSS, HTML, JavaScript, PHP, plain text, and many more. Then it color codes the snippets accordingly.

It also preserves indents which I've found very useful for usability/user experience when copy/pasting decent sized code snippets from other sites.

The syntax is easy, you just switch to the HTML editor in a post and wrap all of your code in a <pre> tag. For example:

<pre lang="php">
    echo "I love cheese!";

The above will output a nice color coded PHP snippet. The plugin leverages the GeSHi syntax highlighting class to do its dirty work. All of the available languages are outlined on the GeSHi website.

share|improve this answer

I've found success using Nathan Rice's Single Post Template plugin, and creating a "no-sidebar" template page for posting code. Works pretty well for most cases.

share|improve this answer

Perishable Press has extensive tutorial on styling <pre> tags, including nifty auto-expand on hover for long lines.

share|improve this answer
up vote 1 down vote accepted

In the end I used the theme called Elegant Grunge from Michael Tyson.

I'm using Windows Live Writer 2011 with the Insert Code plugins for it, and it works very well.

Check out my blog Alphaot.com to see how it ended up.

share|improve this answer
It's quite difficult to copy code. – Giorgi Dec 10 '10 at 9:26

I personally find the CSS method to be suitable..


See the answer provided by Jake Scott.

share|improve this answer