WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am new to wordpress (installed yesterday for first time). In order to add syntax highlighting i installed the WP-Syntax plugin and i copied pasted the following snippet in the edit post window. Its copied from the usage examples.

<pre lang="php">
<div id="foo">
function foo() {
echo "Hello World!\\n";

However when i preview it on the main site i end up seeing the following as it is, whereas i was expecting to see highlighted php code. Could anyone point out what could be the issue?

share|improve this question

closed as too localized by toscho Nov 22 '12 at 6:07

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Much probably the plugin is conflicting with another plugin or with your theme... Check this troubleshoot guide and also check your browser console to see if any errors are being dump. Close voting as too localized. – brasofilo Nov 11 '12 at 11:52
up vote 1 down vote accepted

Have you looked to see if the correct style sheet is being loaded to change the highlighting? It appears to be a white background with some font styling for the different language. If you want something more than that, you will need to customize the css for it.

share|improve this answer
You're right, the css wasnt being loaded correctly. Problem was i was adding that snippet in 'text' view. I changed to 'html' view, pasted it and it worked. Thanks. – N.M. Nov 16 '12 at 8:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.