Software, Development, and WordPress

WP Gist For GitHub Gist in WordPress

When it comes to embedding source code into posts, I’ve been a fan of the SyntaxHighlighter plugin by Alex Mills for a long time – I’ve used it on every programming blog that I’ve maintained for as long as I can remember.

But ever since GitHub rolled out Gists, I’ve been using those to store frequently used functions, examples of code for posts or other articles, and snippets for which I’d like to have others come in introduce their changes, and/or their comments.

Straight from the Gist homepage:

Gist is a simple way to share snippets and pastes with others. All gists are Git repositories, so they are automatically versioned, forkable and usable from Git.

Easy enough, right?

Perhaps one of the cooler things about gists is that they can be embedded in WordPress posts; however, I’ve had mixed success with the native support in doing that.

But Michael Novotny’s WP Gist plugin makes it really easy to embed nice-looking, gist-specific code into a WordPress post.

Get The Gist in WordPress

WP Gist Homepage

From the website:


  • Add GitHub Gist embeds to WordPress posts and pages with a shortcode.
  • Support for displaying a specific file within a Gist that has multiple files.
  • Adjusted styles to make GitHub Gist embeds look good with nearly any theme.

In short, WP Gist makes it really easy to embed GitHub Gists into your site (and do so without breaking any styles), but one of the things that I love the most about the plugin is that it allows you to include only a specific file from a gist.

For example, I used this feature in a recent post when talking about the WordPress Theme Customizer. Specifically, the Gist is made up of three different files each of which I needed to include at different times.

But WP Gist made it that much easier to draft the post.

Download WP Gist

For usage instructions, how to install the plugin, or even to contribute to it, you can check out the GitHub project page; otherwise, download the plugin.


  1. Clifton Griffin

    I’m personally a fan of oEmbed Gist:

    You simply paste a gist URL into your post and it automatically generates the embed.

    This and GitPress Repo provide all of the Github functionality you could ask for:

    Gitpress actually embeds a repo in your post…not too shabby!


    • Tom McFarlin

      Sweet – thanks for sharing these. I know Gary also mentioned GistPress, so I’m going to have to check it out, as well.

  2. GaryJ

    You may also like to give GistPress a try, since it has additional useful features:

    • Tom McFarlin

      Oh, nice! Thanks for sharing this, Gary.

      • Carrie Dils

        I give a second vote for GistPress, primarily because enables my email/rss subscribers to still link to the gist as opposed to just returning…nothing.

        WP Gist may do that too?

  3. Frank

    Hi Tom, maybe you will check a other solution for this requirement.
    My plugin on github create also content for feeds, for non javascript page.

Leave a Reply

© 2020 Tom McFarlin

Theme by Anders NorenUp ↑