A GitHub gist is a code snippet and each gist is a Git repositories, so they are automatically versioned, forkable and usable from Git.Add the following code snippet to your theme’s functions.php file to create a shortcode that will show GitHub gists on your posts.

// GitHub Gists Shortcode // WordPress snippet by himpfen.com function gist_shortcode($atts) { return sprintf( '<script src="https://gist.github.com/%s.js%s"></script>', $atts['id'], $atts['file'] ? '?file=' . $atts['file'] : '' ); } add_shortcode('gist','gist_shortcode');

The shortcode for your post is:

[gist id=]

To display a certain file:

[gist id= file=]