0

I want to write code in my wordpress blog. which is hosted in wordpress.com. I need a Syntax Highlighter to show code. Can I configure/add Plugin in wordpress.com config panel ? or I do need a self hosted blog ?

1

you can use the [sourcecode] shortcode on WordPress.com which is built in for you, no need to install or configure anything.

For example to get this results :

enter image description here

just wrap your code in these tags:

[sourcecode language="css"]
your code here
[/sourcecode]

you can see a list of supported languages and a few other parameters you can use with this shortcode at http://en.support.wordpress.com/code/posting-source-code/

  • But IT makes all my < and > to &lt; and &gt; in my C++ Code – Neel Basu Oct 1 '11 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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