3

Is there a way I could install some plugin or have syntax highlighting for my wordpress.com blog or do I need to install WP on my own server to be able to install a plugin to do that?

4

WordPress.com uses Alex Gorbatchev’s SyntaxHighlighter so all you need to do is use the right shortcode ex:

[code language="css"]
#button {
font-weight: bold;
border: 2px solid #fff;
}
[/code]

which gives you something like this:

enter image description here

it has more features and you can see a list of supported languages at http://en.support.wordpress.com/code/posting-source-code/

  • Simple code instead of sourcecode works fine. – Lucky Sep 15 '15 at 7:52
  • Is it possible to import highlight.js into wordpress.com - free plan? I have imported my blogger posts into WP, but my syntaxhighlighter is gone, of course... – Legends Aug 15 '16 at 19:39
  • Does it work for Preview? or I need to publish to see the highlight. – Sivaraman Mar 11 at 8:20
-2

There is a plugin call "SyntaxHighlighter" really nice and easy. I am using on my blog. here is the link http://wordpress.org/extend/plugins/syntaxhighlighter/

  • Please read the question carefully - the question is about WordPress.com but not about a site on the person's own server (upon which plugins can be installed freely) – ericn Mar 13 '15 at 3:51

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.