Great Wordpress plugin: Code Markup

by Arthur
Posted on Monday, June 5th, 2006 at 8:18 pm CET
One of the plugins I use on this Wordpress site is Bennett McElwee’s Code Markup that allows you display code in your Wordpress posts without having to replace all < with < and > with > — which can be a real pain.
The Code Markup Wordpress plugin is a very light-weight plugin that let’s you show code like this:
< ?php echo "
hello”; ?>
To print this all you need to type in your blog is:
<code><?php echo “<p>hello</p>”; ?></code>
The great thing of this plugin is that it let’s you allow certain tags; for instance in this example we’re allowing the <span> span tag to show a part of the code in green:
<code allow=”span”><?php <span style=”color:green;”>echo</span> “<p>hello</p>”; ?></code>
You can download this plugin here.
The style of the code boxes I use on this site is the following. This code gives the code boxes a standard width of 420 pixels, a dashed border and the overflow:scroll gives it scroll bars if the text is too wide to fit inside the box.
code {
display:block;
overflow:scroll;
width:420px;
padding:10px;
border:1px dashed #bbd69c;
background:#f6fae2;
font-family:"Courier New", Courier, mono;
font-size:11px;
}
One of the plugins I use on this Wordpress site is Bennett McElwee’s Code Markup that allows you display code in your Wordpress posts without having to replace all < with < and > with > — which can be a real pain.
The Code Markup Wordpress plugin is a very light-weight plugin that let’s you show code like this:
hello”; ?>< ?php echo "
To print this all you need to type in your blog is:
<code><?php echo “<p>hello</p>”; ?></code>
The great thing of this plugin is that it let’s you allow certain tags; for instance in this example we’re allowing the <span> span tag to show a part of the code in green:
<code allow=”span”><?php <span style=”color:green;”>echo</span> “<p>hello</p>”; ?></code>
You can download this plugin here.
The style of the code boxes I use on this site is the following. This code gives the code boxes a standard width of 420 pixels, a dashed border and the overflow:scroll gives it scroll bars if the text is too wide to fit inside the box.
code {
display:block;
overflow:scroll;
width:420px;
padding:10px;
border:1px dashed #bbd69c;
background:#f6fae2;
font-family:"Courier New", Courier, mono;
font-size:11px;
}





























