There’s a good post on CSS-Tricks about using wordpress to post code,
Post Using Markdown
- This makes it easier to post code without having to worry about the editor messing up your post. Sidenote: I think WordPress is great, but I hate the editor, because it's always messing with you.
- Installed the Jetpack plugin. Note that you have to turn on Markdown in the Jetpack settings
- Turned off the visual editor (Users>Your Profile>Disable Visual Editor)
- Installed Markdown Quicktags
- There is a guide for using markdown here
I downloaded Prism and included the css and js file in my theme.
To post some code
```language-php <?php put_code_here(); ?> ```