Wordpress PHP Code Display
Posted by Matt on November 27th, 2006
I was looking for a Wordpress plugin to display PHP code on my site. I found the following:
http://priyadi.net/archives/2005/09/27/wordpress-plugin-code-autoescape/ I tried this one but did not like it because it does not highlight the code and I could not seem to get it to work quite right, it kept adding –> to certain tags/areas… didn’t spend time trying to figure out what was going on as I didn’t like it anyway.
http://www.deanlee.cn/wordpress/code_highlighter_plugin_for_wordpress/ I tried this one next and I like it. It displays the code and highlights it with no problems/errors and is easy to impliment. One thing I didn’t like about it is that I had to use BR tags with each tags for each line to end the line.
http://dev.wp-plugins.org/wiki/GeshiSyntaxColorer I didn’t try this one, but I believe it is the same software as the one above.
November 30th, 2006 at 1:42 am
Update to my experience with the Dean Lee plugin. I like the plugin itself but not the way wordpress messes with the formatted text. I figured out the BR thing. If the text is pasted formatted into the wordpress editor box (WYSIWYG) with the pre tags, it displays correctly. But if you edit this down the line it destroys the formatting. Then again if you paste directly into the HTML box then line breaks are not converted to BR and you end up with one line of code.