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?

2 Answers 2

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/

3
  • Simple code instead of sourcecode works fine.
    – Lucky
    Commented Sep 15, 2015 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
    Commented Aug 15, 2016 at 19:39
  • Does it work for Preview? or I need to publish to see the highlight.
    – Sivaraman
    Commented Mar 11, 2019 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/

1
  • 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
    Commented Mar 13, 2015 at 3:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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