Highlight code in wordpress

Install a plugin called Alex Gorbatchev’s SyntaxHighlighter which can search plugin “SyntaxHighlighter Evolved” and then active it. New a post and define “Shortcode Parameters” in [Text] tab. Example language base Some example shortcodes:

[ php ]your code here[ /php ]

[ css autolinks=”false” classname=”myclass” collapse=”false” firstline=”1″ gutter=”true” highlight=”1-3,6,9″ htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”true” title=”example-filename.php” ]your code here[ /css ]

[ code lang=”js” ]your code here[ /code ]

[ sourcecode language=”plain” ]your code here[ /sourcecode ]

# No space in [ ] for shortcode #

Reference link http://en.support.wordpress.com/code/posting-source-code/