Do you run a development related blog and want to share code snippets on your blog posts? By default, showing codes in your WordPress site is not easy. For security reasons WordPress filters out any raw code added into posts, widgets, or comments. We’re often asked about what syntax highlighter plugin do we use to display code on our website. In this article, we will show you how to easily display code on your WordPress site.
First you need to install and activate the Synatx Highlighter Evolved plugin. Upon activation, you need to visit Settings » Syntax Highlighter to configure the plugin settings.
The basic plugin settings should work for most websites. However, you should review all settings and make changes if necessary. Each option has detailed description to explain what it does. Once you are done, simply click on the save changes button to store your settings.
Syntax Highlighter evolved uses simple shortcodes to display code. For each language you need wrap your code in the shortcode for that language.
For PHP you would wrap your code like this: