Syntax Highlighter

At WPBeginner, we often find ourselves sharing code snippets in our posts. When we first started, we were encoding our code and sharing it as ‘pre’. That required a lot of manual work. The reason why we had to manually encode the code was so WordPress doesn’t render the output. For example, if you were sharing HTML, then instead of showing the code, it will show the final output. This is when SyntaxHighlighter Evolved came to the rescue.

It allows us to easily post syntax-highlighted code without losing it’s formatting or making any manual changes. It also allows users to copy the code, or print the code if they like.

The plugin has the option for you to choose the color scheme, display the line numbers, display the toolbar, automatically make URLs clickable, collapse code boxes, show a ruler etc. It has the option, so you can customize the styling as well through additional CSS classes.

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).