How to Effectively Show Code Snippets in WordPress Posts

April 11, 2009

The SyntaxHighlighter Evolved plugin for Wordpress will allow you to show code examples on your WordPress blog. See examples in this post.

Example PHP Code Snippet


[php]
<?php
echo "Hello World";
?>
[/php]

Example HTML Code Snippet


[html]
<html>
<body>
Hello World
</body>
</html>
[/html]

Example JavaScript Code Snippet


[javascript]
alert('Hello World');
[/javascript]
Anthony Tietjen

About the Author

Anthony Tietjen is a software engineer with experience across desktop, mobile, and web development. Husband and father, with a passion for music and the outdoors. Connect with Anthony on LinkedIn and X/Twitter