Hi all Does anyone know of a good plugin for wordpress that will enable me to display php with coloured syntax? I've look at some that use geshi, but none of them work well with the graphical post editor. Thanks, Brew
look at "inline php" version 1.2.2 http://blog.codexpress.cn/php/wordpress-plugin-inline-php/ http://blog.codexpress.cn/
Inline php is good, I've been using it since a long time ago. But your php code can be seen via "view source" from your browser. I think it's best to create separate php file, ex. whatincluded.php and add only include("the_correct_path/whatincluded.php") on your post.
@Gordaen - thanks, this one is quite good, but it does have a few bugs. I can't get it to stop changing <, > and & symbols into < > and & respectively. Any ideas? @hasbehas - thanks, but I am only looking to display php code and not execute it Brew
What version of WP are you using? Also, do you use the rich text editor? I use it on my ecommerce blog, and it definitely works in versions 2 and up. I think that the rich text editor may cause problems with it, but not positive on that one.
Do you mean that if you save and keep editing, the symbols are changed into the entities (e.g., < in the editing box? I haven't had that problem, but I don't use the "fancy" post editor. If you give me a specific example, I can try it out on mine with and without the WYSIWYG editor and see if I have the same problem or not.
I'm using version 2.3.3 I am using the visual editor, and I only need to post once (without re-editing) to get the problem behaviour Brew
Hmm, not sure what to say. I just tried it on mine and didn't see that problem, but I did experience it adding a space between the "<" and the "?php" when doing a Save and Continue Editing.