I was trying to include some php code in my post and much to my surprise, the tags don't show up as intended. Instead, they get interpreted, even though I used the code tag to wrap it. How can I correct this?
I was trying to include some php code in my post and much to my surprise, the tags don't show up as intended. Instead, they get interpreted, even though I used the code tag to wrap it. How can I correct this?
Maybe I didn't explain myself very well. What I'm trying to do is to simply display the code, not to run it.
Ahh!
Two ways to go about this:
1. Instead of using opening and closing brackets: ( < and > ), use their character entity equivalents: < and >
2. http://www.coffee2code.com/archives/2005/03/29/plugin-preserve-code-formatting/
Ahhh, I totally forgot about < and >. What I ended up doing was to copy the code into the "design view" of Dreamweaver and then copy what's in the "code view" and pasted that into WP.
Thanks Kafkaesqui!
This topic has been closed to new replies.