Inserting source code in a blog post

I’ve been looking for WP plugin to add source code in blog posting. I want to share my code sample via the blog. At last I found this WP-Syntax plugin.

Here how a source code will look like

1
2
3
<?php
  echo "Hello World!";
?>

You need to add <pre lang=”php” line=”1″> tag before and </pre> tag after the source code. The parameter line=1 is to show the line number

Leave a Reply

Your email address will not be published. Required fields are marked *