WordPress – Code Sharing – Github/Gist


It is “Clean out the room” weekend.  And, I am here ruminating through all the dead wood, printed paper, clutter I have stored in my little bedroom.

The one I am currently on is the one by Chris Coyier and it is titled “Posting Code Blocks on a WordPress Site | CSS Tricks”.

Truth be told is was the inspiration behind our last post, as well.


Posting Code Blocks on a WordPress Site | CSS-Tricks

Chris post is available here.


A post is one thing, but taking the time to read the comment block is where one usually get all the fireworks.

What works, and what doesn’t.

Essentially, why the whole world is going to hell and why all this doesn’t really matter.

Hidden there somewhere, the reassuring “… but then you can try this, as well.”


Lewis Coyles

Here is the comment left by Lewis Cowles :-


And, so the drill is you go to https://gist.github.com/.

Home Page


Data Entry

You do a bit of data entry

  1. Gist Description
    • Give the code a bit of description
  2. File name
    • Filename and extension
  3. Code Block
    • Enter the code snippet
  4. Private or Public
    • Indicate whether private or public
    • Public
      • Search Engines will collect metadata
    • Private
      • Excluded by Search Engines
    • Anyone with URL can access it



Come back to wordpress.

Post Editor

The easiest for me to is to just access the Text tab and use the gist tag.

Sample Code

Sample Output

Original Code

Revised Code



Please read more here….

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s