How to highlight code in hosted wordpress blogs

This has been something that has been annoying me for quite a while, how do I show c# and javascript code in the blog in a decent way.

The other important factor to note here is I am using a hosted blog, so all the solutions with plugins are no good to me.

Well I finally figured it out thanks to this stackoverflow page here

you put this in your code but make sure you put it in the Visual view and not the HTML. I’m not sure how to type this so I have typed the square bracket rather than putting them in (because then it puts in code)


[sourcecode language='javascript']

here is an example

function customerid_onchange(){
 // Get value of the selected customer account
 var lookupItem = Xrm.Page.getAttribute("parentcustomerid").getValue();

10 thoughts on “How to highlight code in hosted wordpress blogs

  1. Prince-O-Perseh December 28, 2011 / 1:41 am

    Great, thanks


  2. code highlighter wordpress March 5, 2014 / 3:14 am

    I have learn some excellent stuff here. Definitely worth bookmarking for revisiting.
    I surprise how a lot effort you place to make any such
    great informative site.


  3. zip March 28, 2014 / 2:52 am

    Hi there, I enjoy reading all of your article post.
    I wanted to write a little comment to support


  4. beste casino på nett May 7, 2014 / 2:07 pm

    Everything published was very reasonable. But, what about this?
    suppose you composed a catchier post title? I mean, I
    don’t want to tell you how to run your blog, but what if you added a headline to maybe get people’s attention?
    I mean How to highlight code in hosted wordpress blogs | Hosk’s Dynamic CRM Blog is
    a little boring. You should glance at Yahoo’s front page and note how they write news titles to get people to open the
    links. You might add a related video or a pic or
    two to get people interested about what you’ve written.
    In my opinion, it would make your posts a little bit more interesting.


    • Hosk May 7, 2014 / 2:11 pm

      Your comments are very constructive.

      This article was written over two years ago and hopefully my new blogs are a bit more jazzy for you.

      The blog title stays. people don’t follow blogs because they have a fun title, they follow blogs because they have good blog posts. Also not forgetting I love the Hosk brand


  5. transformice May 14, 2014 / 8:21 pm

    Hi there, just wanted to say, I liked this blog post. It was
    funny. Keep on posting!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s