If you have ever tried to display code within a post you will know all about the problems this can cause. That is why there are some amazing developers who create plugins to make that solve this niggly issue.
Which is the best? I have been using Code Markup, it is simple to use and displays the code just the way I wanted it. To be honest, they are all good, it just depends on your needs.
Some plugins haven’t been tested all the way up to version 2.7 but,the chances are that they will work.
WP Advanced Code Editor WP Plugin
Plugin URL : WP Advanced Code Editor.
Description : WP Advanced Code Editor integrates the EasyArea advanced code editor into WordPress. This adds real time syntax highlighting, line numbering, full screen editing, and more to the code editor in the “Add New Post” and “Add New Page” screens.
WP Compatibility : 2.3 – 2.7.
Note : Make sure that the WYSIWYG editor is disabled, the plugin is not compatible with the WYSIWYG editor.
WP Advanced Code Editor Screenshot (Admin View)
Developer Formatter WP Plugin
Plugin URL : Developer Formatter.
WP Compatibility : 2.5 – 2.7.
Developer Formatter Screenshot (Admin View)
File Inliner WP Plugin
Plugin URL : File Inliner.
Description : This plugin displays the content of a file in a post. The content of the file (called a “snippet”) is put in a pre block.
WP Compatibility : up to 2.6.
File Inliner Screenshot (Blog View)
FV Code Highlighter WP Plugin
Plugin URL : FV Code Highlighter.
Description : This plugin supports the highlighting of PHP, HTML, CSS and XML. The default tag-highlighter color scheme uses the same colors that Adobe Dreamweaver uses. This makes it easy for your visitors to recognize what type of codes you wrote. These colors can be changed to your liking in the WPadmin section of your blog.
WP Compatibility : 2.5 to 2.7.
FV Code Highlighter Screenshot (Blog View)
WP-SynHighlight WP Plugin
Plugin URL : WP-SynHighlight.
Description : This plugin aims to provide complete functionality in syntax highlighting for the wordpress users by using shortcodes (much like Bbcodes) it does simplify the job.
WP Compatibility : up to 2.7.
WP-SynHighlight Screenshot (Blog View)
Code Snippet WP Plugin
Plugin URL : Code Snippet.
Description : A large number of languages are supported with this plugin and it can be easily extended for more. it is recommended that you always wrap your code in a pre however, most times you generally do not need to.
WP Compatibility : Tested up to 2.3.
Code Snippet Screenshot (Blog View)
Code Markup WP Plugin
Plugin URL : Code Markup.
Description : The plugin works by escaping most special HTML tags and characters so they display exactly as typed, but leaving certain ones alone so they will render as normal HTML. The default set of allowed tags is the standard formatting tags like em, strong, span and so on. You can control this explicitly.
WP Compatibility : Tested up to 2.5.
Code Markup Screenshot (Blog View)
WP Chili WP Plugin
WP Chili Screenshot (Blog View)
Google Syntax Highlighter WP Plugin
Google Syntax Highlighter Screenshot (Blog View)
Highlight Source Pro WP Plugin
Plugin URL : Highlight Source Pro.
Description : Powerful, flexible, XHTML-compliant, server-side code highlighting.Set your code-blocks as preGeSHi (see filelist in the /GeSHi-directory) use the filename (without extension) as language-attribute. If your code is encoded add the ‘enc__’ – prefix.
WP Compatibility : Up to 2.5.
Highlight Source Pro Screenshot (Blog View)
Sniplets WP Plugin
Plugin URL : Sniplets.
Description : Sniplets is a generic text insertion plugin with support for an extensible processing framework. At its simplest this means you can dynamically replace text in your posts with text that may be defined elsewhere, or created by some other module. For example, you can use Sniplets to perform syntax highlighting of files, execute custom PHP code, insert data from a database, and perform all manner of other useful tasks within a standard interface.
WP Compatibility : Up to 2.7.
Sniplets Screenshot (Admin View)
CodeColorer WP Plugin
Plugin URL : CodeColorer.
Description : CodeColorer is the plugin which allows you to insert code snippets into the post with nice syntax highlighting. Simple yet effective.
WP Compatibility : Up to 2.7.
CodeColorer Screenshot (Blog View)