Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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">
<?php
function foo() {
echo "Hello World!\\n";
}
?>
</div>
</pre>

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
add comment

1 Answer 1

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
add comment

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