Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WordPress Gist ShortCode
// github gist Shortcode Usage: [gist un="" id=""]
function gist_shortcode( $atts ) {
'un' => '',
'id' => ''
), $atts));
return '<script src="' . $username . '/' . $id.'.js"></script>';
add_shortcode('gist', 'gist_shortcode');

This comment has been minimized.

Copy link
Owner Author

jackreichert commented Nov 5, 2014

The gist creates the proper embed code, but the script on github's end doesn't seem to be working anymore. I'll update if it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.