WordPress : How To Display Code Snippets On Your Blog

When I started this blog, I manually formatted any sample code I used in a post which is EXTREMELY tedious.  One weekend I had a spare few hours, so I tried a few of the WordPress plug-in’s.  ,Out of all the plug-ins I experimented with, below details my preferred solution.

Preserve Code Formatting : This great little plug-in will keep your formatting when you do a copy and paste form Visual Studio (or whatever IDE you use) which makes it a lot easier to proof read your posts.

Google Syntax Highlighter for WordPress : This plug-in will wrap all your code into a nice format, colour code it and provide a nice copy code function.  It’s really easy to add, all you need to do is add your code snippet into the following tags and it works.


 Code goes here

Jon D Jones

Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge

More Posts