SyntaxHighlighter Evolved


As seen on

SyntaxHighlighter Evolved allows you to easily post syntax-highlighted code to your site without having to escape the code or anything. It uses the SyntaxHighlighter JavaScript package by Alex Gorbatchev to do the highlighting and supports all of the package’s parameters via shortcode attributes.

For a list of supported languages (most widely used languages are supported), see the support document.

Example Code Output:

Note that there are various different color schemes available.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en" lang="en">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>PHP Code Example</title>
	<h1>PHP Code Example</h1>

	<p><?php echo 'Hello World!'; ?></p>

	<p>This line is highlighted.</p>

	<div class="foobar">
		This	is	an
		example	of	smart

	<p><a href="">WordPress</a></p>

If you prefer, you can hide the line numbering and other UI stuff with the “light” mode, for example:

[php light="true"]your code here[/php]

There are many other parameters and defaults you can control via the Settings page or the shortcode parameters. Full details and instructions are located at the bottom of the Settings page.



This plugin is available on GitHub. Issues, patches, and pull requests are welcome.

1,841 thoughts on “SyntaxHighlighter Evolved

  1. i have found a Exception :/
    PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ‘;’ in Entity, line: 1108 in /wp-content/plugins/insert-php-code-snippet/shortcode-handler.php(26) : eval()’d code on line 3

  2. Pingback: ???????????? | ZZ'BLOG

  3. Pingback: Dashboard graphics with R | NorCalBiostat

  4. Pingback: Hello world! | user's Blog!

  5. Pingback: First post | gdappdelegate

  6. Pingback: ???????????????????? | generative design workshop

  7. Pingback: WordPress??????SyntaxHighlighter?????? |

  8. Pingback: Adieu SyntaxHighlighter

  9. Pingback: Everyday Microsoft Technology | Sytax Highlighter

  10. Pingback: Test av inlägg med programkod - Genuin IT AB

  11. Pingback: How to: Textarea that can do syntax highlighting on the fly? | SevenNet

  12. Using the default twentyfifteen theme, the gutter with line numbers do not appear in syntaxhighlighter. Changing back to twentytwelve that I had been using before restores this functionality.

  13. Hi, fab plugin – I’m going through my post history and updating them with the code tags.
    Mostly working fine, but on one of my (longer) posts, it’s changing any symbols ( , ” etc) to their HTML code. My other posts are rendering fine – so wonder if there might be something I should look out for in the rest of my post which could be conflicting? Using these symbols in the main body works fine – just not in the text/code blocks. Thanks!

    • The plugin escapes HTML that is within it’s shortcodes behind the scenes and before it goes into the database so that if the plugin is disabled, the HTML doesn’t suddenly start rendering. However when you go to edit the post, it should reverse the process so that it looks the same within the editor.

  14. Pingback: Menuliskan Baris Perintah dalam WordPress | chaplux

  15. Pingback: 40+ ESSENTIAL WORDPRESS PLUGINS - DostiFun

  16. Pingback: Scripts Linux | SOSpedia punto net

  17. Pingback: Get a site like mine! | Ramblings

  18. Pingback: WordPress??????SyntaxHighlighter?????? | Tan_Jin's Blog

  19. Pingback: Best Wordpress syntax hightlighter plugin: SyntaxHighlighter Evolved - Minh Thang's Blog

  20. Pingback: ?-????? | ?????

  21. Hey. I was using a different one that wasn’t as good. Switched to yours, which is better. However, I have hundreds of posts with many snippets marked as XAML, as I coded in WPF for a long time. Everytime there is an update, I have to edit syntaxhighlighter/syntaxhighlighter.php and manually add this brush alias:

    ‘xaml’ => ‘xml’,

    Do you think you could add that to your brush aliases for next release?

  22. I’m surprised it works because I didn’t think it would as xaml is not a recognized alias:

    As documented here, you can just add this to your theme’s functions.php file though to avoid editing the plugin:

    add_filter( 'syntaxhighlighter_brushes', function( $brushes ) {
    	$brushes['xaml'] = 'xml';
    	return $brushes;
    } );
  23. Pingback: WordPress???? SyntaxHighlighter Evolved – w1100n

  24. Pingback: Formatting in WordPress | Andrew's Blog

  25. Pingback: 25 Syntax Highlighters: Tried and Tested « site design

  26. Pingback: 25 Syntax Highlighters: Tried and Tested - Innovative Studio

  27. Pingback: 25 Syntax Highlighters: Tried and Tested | Web Technologies

  28. Pingback: 25 Syntax Highlighters: Tried and TestedFree Internet Tutorials | Free Internet Tutorials

  29. Pingback: 25 Syntax Highlighters: Tried and Tested | The Web Geek

  30. Pingback: Getting highlighting with SyntaxHighlighter Evolved

  31. Pingback: WordPress??????SyntaxHighlighter????(?) | Welcome

  32. Pingback: Developer's blog | amazon-ec2-using-smart-update-to-wordpress-plugins

  33. Pingback: WordPress??????SyntaxHighlighter????(?) | Welcome

  34. Pingback: ??? ????? ???????????? | ?????????-????-?-??????-??????????????-????????????-?-wordpress-syntaxhighlighter-?-comment-form

  35. Hi. Thanks for this nice plugin. I have but one problem with it: how is it possible to use the syntax highlighting within a paragraph? I would like to refer to parts of the code within a sentence and use the same highlighting for that, but I can’t seem to find a way to do that.

  36. Pingback: WordPress blog için gerekli 10 eklenti | KirmiziKit :d

  37. Great plugin! What would like is that the syntax for all code tags is left aligned except for de txt-tag. The syntax for de txt-tag has to be centered. Is that possible? I have experimented a bit with the class but can not get done this.

  38. Pingback: ?????????? ???????????? ????? — ??????? 1 | Seo-New

  39. Pingback: Test… SyntaxHighlighter

  40. Pingback: Incrustar “gists” de github en WordPress

    • Those were only needed in the old version of the highlighting library because when you used to highlight the code with your mouse, it would also include the line numbers. In the latest version which my plugin uses, you can copy the code just like you would any other text.

      However if you want to switch back to the older version of the library, you can do so from the top of this plugin’s settings page. Due to a security issue though, the copy to clipboard button will not work. It required a Flash file to work and the file had security issues so I was forced to remove it.

  41. Pingback: SyntaxHighlighter Evolved | WP Plugin Directory

Leave a Reply