Have you ever wanted to display some code in your blog posts but didn’t know how? HTML, CSS, php, etc. can look a bit messy if not formatted to look different from the rest of your post, which is why we use the SyntaxHighlighter Evolved plugin on our site when needed.
Why Would You Need To Include Code In Your Posts?
Admittedly, not everyone will need to include code in their posts; it is more useful for sites that talk about web design and coding (like ours does now and again).
There will be times that you want to include certain coding information, whether it’s a short single line of code or a full page for people to use. This is particularly useful when writing tutorials or trying to explain something.
Now, instead of simply adding the (let’s say HTML) code to your post as you would any other text, it can be good to format it so that it stands out. You also need to consider the fact that many people may want to copy & paste that code so they can use it themselves. Any way you can make it easy for them to do that is good for your site. This is where the SyntaxHighlighter Evolved Plugin comes in.
What Does The SyntaxHighlighter Evolved Plugin Do?
Developed by Alex Mills (AKA – Viper007Bond) who is part of the Automatic team (the guys behind WordPress.com and other great online projects), the SyntaxHighlighter Evolved plugin allows you to easily highlight code on your site.
For example, let’s say that I want to write a simple tutorial about how to add a clickable image to your WordPress sidebar. In order to let people know, I would need to give them a sample code that they can use on their own site. Now I can either display it like this…
<a href=”http://WEBSITE LINK HERE”><img src=”http://IMAGE LINK HERE”/></a>
…or I can display it like this with the SyntaxHighlighter Evolved plugin.
<a href="http://WEBSITE LINK HERE"><img src="http://IMAGE LINK HERE"/></a>
Both codes are exactly the same, though I think you can see why the second one is better to use. Not only does it make it stand out from the rest of your post, but people can copy it much easier for their own use. This is even more prevalent when you need to include long pieces of code in your posts.
Do you use this plugin? Do you use a different plugin for the same purpose? Please let us know by leaving a comment below.