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!
- Best Free Source Code Editors for Mac OS
- 10 Best WordPress PLUGINS You Never want to MISS!
- 15+ Best Free PHP IDEs for PHP Developers
- How to show source code in wordpress comments?
- Free HTML Markup Editor
- 10+ Best Tutorials for WordPress Plugin Writing & Development
- Best affiliate plugins for WordPress!
- 5+ Useful WordPress Breadcrumbs for your Website!
- Fix ->Wordpres plugin could not be activated fatal error cannot redeclare!


February 9, 2011
im reading this and following slightly,, i need a lot to learn with me codes,, where can i learn the basics of code