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
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:
it has more features and you can see a list of supported languages at http://en.support.wordpress.com/code/posting-source-code/
-
-
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...– LegendsAug 15, 2016 at 19:39
-
Does it work for Preview? or I need to publish to see the highlight. Mar 11, 2019 at 8:20
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)– ericnMar 13, 2015 at 3:51