icebluebanana.com

the evolution of Internet business

WordPress and code display plugins

Posted by: bill on March 16, 2010

Ok, so though I have not said so, I would imagine that most of the people who read this post (aside from me, that will probably be my mom), realize that I am using WordPress for this blog.  Mom – you can see information about WordPress here.  Everyone else – I am only slightly less of a noob with WP than my mother.  Please bear with me.

There are some things that just do not look very good with WordPress out of the box.  I am not going to solve all of them right now, but I am going learn how to do a few of them and document them here.

The first thing that I want to be able to do is show pieces of code here without them looking bad, or worse, not looking like code.  So, I took a look at the plugins (in WordPress, click on Plugins, then Add New), and found one that I think will do the job.  It is called “Syntax Highlighter for WordPress” which is currently at version 2.1.364.  So, I clicked on Install and saw the screen below.

Of course, once I had done this, I could not (easily) figure out how to use it.  Right or wrong, I removed it after about 45 seconds of having installed it.

The next one I found was called “FV Code Highlighter” which I found noted in this blog.  I am not sure who speckboy is, but he sure has a great name.

Anyway, I installed this new one and that looked similar to the picture above.  I am not going to put it here as I was not sure if it would work, and besides, I do not feel like it.  So, I noticed while installing it that there is a warning saying that it might not work.  Seems like a good time to find out.

Nope.  The plugin looks really nice, but I got a message that says “The plugin does not have a valid header” which is a bummer because I really liked the look of it.  Oh well, lets try another one.

Actually, this is getting funny.  I noticed that there is a plugin for showing off your WoW character.  Time does not permit that now, but I almost can’t wait. Dreams do come true sometimes.

So, next up is “WP-SynHighlight 2.2.1.”  This one does look promising.  I installed it and it gave me no reason to complain.  I also noticed a new button in my WYSIWYG WordPress editor.  It looks like this –

So, lets try this out.  I will press the button first the put in some code.

Ok, so this is reasonably badass.  The first thing that I see is this – a box to choose the code type and some other things.

Once I have done that, I can enter some code to display.

And here it is (I did end up editing the html code I put in the box a bit more as you see below, but it is fundamentally the same).  Pretty cool!  I am not sure if I like it since the code is not highlighted, but there may be a way to make it easier to read.  I need to get back to work now though, so perhaps that will happen another time.

<html>
  <head>
    <title>test</title>
  </head>
  <body>
    some words
  </body>
</html>

I hope this helped someone – have a good day!


Advertisement







Related posts

coded by nessus

No comments

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.