Adding Code To WordPress Blogs

Well, I tried. I have been wrestling with various plugins/hacks/work-arounds that will allow me to post code snippets into my blog without it ending up borked. Every plugin worked, but then WP would insist on adding <p> and <br /> tags everywhere, even on the code inside the respective tags. I have now decided the hard work is just not worth it and went back to using Snipt and linking to my code that way.

That was until I noticed the little “embed” function at the bottom of the Snipt code box – What A Find! I can now embed the Snipt code directly in my post, retaining all of the formatting and language syntax bits that snipt does by default. I can’t recommend this enough – give up on WordPress natively handling code snippits and just go ahead and use this method, much simpler and sexy.

Before you style gurus complain that “it doesn’t blend in to my beautifully designed layout” – you can also style the script however you want using css, check out this blog post.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Ping.fm Post to StumbleUpon

0 Responses to “Adding Code To WordPress Blogs”


  • No Comments

Leave a Reply

About Me

Hi. I'm Matt Newham, 23 years old. I'm a network security engineer, specializing in Intrusion Detection.

My Skype Status

Post Archive

  • -2010 (12)
  • +2009 (7)

Dynamic Tag Cloud

IDS K2 powershell Rants Skype Snipt Snorby Snort Twonky Ubuntu Wordpress General (14)
Reviews (2)
Technical Articles (3)

WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.