Posting Source Code in WordPress

Posting Source Code… in my WordPress Blog… So the other day I decided that it is time I spend some more time blogging and documenting the things I do on the computer, whether is be on Windows, MAC or Linux. With all the examples I am starting to post and want to post I figured it would be nice to show the example in its actual code syntax/format.

I started by signing up for the forums, great place. I obviously needed a plugin, extension or hack to get my “source code” to post properly in WordPress. I thought that maybe is was a quote thing but it turns out I was a little off. Click here to see my post in the wordpress forums.

Step 1) download the plugin

Step 2) read instructions on how to use the plugin

Step 3) post some code using the
[sourcecode language="css"]
your code here

Thank you to the wonderful user listed in the above link I was able to install a plugin called “SyntaxHighlighter Evolved.” With a little bit of reading I was on my way, I can now post my source code to WordPress.

Plugin/Extension – SyntaxHighlighter Evolved

How to use SyntaxHighlighter Evolved

My appeal for help! ( forums)


2 thoughts on “Posting Source Code in WordPress

  1. Peanuts

    Hey, I read in the WP/Nextgen forums that you love to help. I am trying to post pics in my album, however, I specifically want them to appear in the thumbs only on particular pages, i.e., pictures of my dog on my dog page, pictures of bugs on my bugs pages. Same with the gallery, if it is possible, to only show those pictures when on the appropriate pages. Any ideas?

  2. admin

    Hi Probums, yes I don’t mind helping! So let me get this straight… You have WordPress along with NextGEN Gallery with an Album of various pictures and want to post specific pictures as per the page content… So to display individual pictures you would use the following code:

    [singlepic id=# w=# h=#]

    So “singlepic” tells NextGEN that you want to use a single picture, “id” tells NextGEN which picture to use, “w” tells NextGEN the width and “h” tells NextGEN the height. Now you can get the individual image ID’s by going into the NextGEN management tool. You can specify the height and with of the picture, making the thumbnail what ever size you want and when a visiting guest click on the picture it will load to the larger original size… what is you website address?

    To display a Gallery you use the following code:

    [nggallery id=#]

    The “nggallery” tells NextGEN that you want to display a gallery and the “id” tells which gallery you want to display.

    If you have any further questions please let me know… I hope this resolves your question!

Leave a Reply

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