Smart Syntax plugin automatically adds Google prettify syntax highlighting to the fenced code blocks in both content and comments.
Its made with Jetpack markdown in mind, which brings the power of markdown extra to WordPress and gives you an easy to use markdown syntax for fenced code blocks.
For more information on usage and features, check out smartpixels.
- Install Smart Syntax either via the WordPress.org plugin directory, or by uploading the files to your server
- Activate Smart Syntax through the Plugins menu in WordPress.You will now see Smart Syntax menu in admin sidebar.
- You can leave the default settings as it is or change according to your needs.
- Voila! Your code is now highlighted.
Jetpack markdown is not a necessity. You can add syntax highlighting for fenced code blocks in the following format
<pre><code class="html"> echo 'Hello World!'; </code></pre>
Please use the support forum here.