Quite often you might want to post code in your wordpress posts (HTML, SQL, CSS, PHP, Javascript etc..) in your wordpress posts but wordpress breaks the code and hides them inside html. Even placing the source inside pre and code tags wont work.
The easy way to do this is use syntax highlighter plugin which is available free from wordpress site. It supports many programming languages and shows the source code in neat formatted line numbers and colored formatting. The plugin shows the source code like this..
The syntax highlighter plugin supports many languages like…
* JavaScript — js, jscript, javascript
* PHP — php
* HTML/XHTML
* XML
* SQL
* VB
* C++
* C#
* CSS
* Delphi
* Java
and many more languages…
Installation
1. Download Syntax Highlighter plugin.
2. Upload it to your wordpress inside /wp-content/plugins/ folder
3. Activate the plugin under wordpress plugins.
4. Go to your theme folder and open footer.php and place
<?php wp_footer() ?>
before closing body tag of the file.
Note: If you dont place this line, then syntax highlighter will not work and it would just convert your source code to pre tag and there will no syntax highlighting.
Usage
Once you have installed and activated the plugin you can enclose the source code by any one of the following tags. Just specify the programming language within single quote
Similar Posts:
- Displaying HTML code in Wordpress Posts!
- 10 Best Wordpress PLUGINS You Never want to MISS!
- Free HTML Markup Editor
- Best affiliate plugins for Wordpress!
- Fix ->Wordpres plugin could not be activated fatal error cannot redeclare!
- Best & Useful Wordpress Plugins For Blogs
- Affiliate Hide v1.0 – Free Wordpress plugin to Hide & Redirect Affiliate Links
- How to create 3D transform of Images in Photoshop
- Which wordpress plugins to show related posts!
- Fix -> Fatal error – Call to undefined function: screen_icon() in WP-Pagenavi Plugin

