How to post Source Code inside a Wordpress blog post
Posted
by jasondavis
on Stack Overflow
See other posts from Stack Overflow
or by jasondavis
Published on 2010-01-25T07:04:48Z
Indexed on
2010/05/14
17:34 UTC
Read the original article
Hit count: 700
I just started a coding related wordpress bog to basicly discuss topics and store code snippets in. I installed a code syntax highlighter plugin which is very nice but I am having a problem. I just tried posting my first code related blog post and wordpress seems to only post some of my code and then it makes some of it not show, like it filters some of it out even though I am wrapping it in tags like this..
<pre class="brush:php">
<?PHP
my code
?>
</pre>
Some of my code works and some gets filtered out somehow. I know this is possible as many wordpress coding sites show source code. Do I need to modify something to make it work in wordpress?
UPDATE
I have confirmed that it does save ALL my code into the database it just filters it out when it try to print to screen, so when I go in to edit the post and textbox populates with ALL the source code intact
© Stack Overflow or respective owner