I installed a syntax highlighter plugin so I could post and highlight code snippets.
My problem is wordpress is converting special characters in my code (e.g. from & to &) when I really just want it to leave my code alone
|
I installed a syntax highlighter plugin so I could post and highlight code snippets. My problem is wordpress is converting special characters in my code (e.g. from & to &) when I really just want it to leave my code alone |
|||
|
|
|
I tracked this solution down from the WordPress Trac ticket found here: http://core.trac.wordpress.org/ticket/6969 The solutions seems to be to add this to your functions.php file:
Source: http://www.viper007bond.com/2009/11/22/wordpress-code-earlier-shortcodes/ REVISED ANSWER: I've tried the solution above, but I've not had any luck getting it to work. I've actually being trying different methods for the same problem with some luck, but none of them really work 100% without completely removing wp_autop and wp_texturize. I have found a way, but it takes an extra step. I'll post my solution in case your interested. My Way:
You can use the CSS I've put together if you like: http://snipplr.com/view/58362/wordpress-code-highlighter-css/ |
||||
|