Syntax Highlighting in WordPress Without Plugin is a method which will show you how easy Syntax Highlighting is in WordPress in Single post without plugin. People usually makes simple things complex. Most of the blogs never need to load the extra junk of CSS and Javascript for Syntax Highlighting in WordPress to be loaded in each and every pages or posts. Syntax Highlighting in WordPress Without Plugin is a Project Started by me, right now the basics will be described.
The Idea Behind Syntax Highlighting in WordPress Without Plugin
If you have no idea about Syntax Highlighting, kindly read this article on Syntax Highlighting. If you already know about Syntax Highlighting, please check this post as well to see that, it is not only Syntax Highlighting, but actually anything like jQuery can be loaded too using the same method.
Limitations of using Syntax Highlighting in WordPress Without Plugin
The only limitation is, you need to add the codes while in HTML editing mode. Do not switch back to visual mode before publishing the post with codes. We will try to override this bug of TinyMCE.
---
You can not use this method in free WordPress blog as javascript embedding is not allowed, although I have not tested, it should not work.
Advantages of using Syntax Highlighting in WordPress Without Plugin
You need not to install any extra plugin, thereby from homepage to about us page will not load any extra CSS and JS. Moreover, no change in MySQL database or the call that actually increases the server’s burden is excluded. As I have said before, most of us never use Syntax Highlighting throughout the blog.
Method and Example of Syntax Highlighting in WordPress Without Plugin

When I am pasting this code for Syntax Highlighting in WordPress Without Plugin, I am using visual mode of editing :
<link rel=”stylesheet” href=”any link to prettify.css” />
<pre class=”prettyprint”>
Your Code Goes Here</pre>
<script src=”any link to prettify.js”></script>
<script>prettyPrint();</script>
But when I am actually showing live example of Syntax Highlighting in WordPress Without Plugin, I am using HTML mode and without looking back publishing it.
1 2 3 | (function() { var jsSyntaxHighlighting = 'thecustomizewindows.com'; })(); |
Resources used for Syntax Highlighting in WordPress Without Plugin
We have used only two files in unmodified form from google-code-prettify project. We have used the minified version’s prettify.js and prettify.css file. This project will be uploaded in Google Project after modification for more easier use with customization. So this webpage will be updated as well.
