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.
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” />
Your Code Goes Here
<script src=”any link to prettify.js”></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.
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.