Embed Gist in WordPress
This is a sample blog showing how to add a gist from Github.com into WordPress blog (For Blogger.com blogs please visit here). Assume you want to add the following gist to your blog.
You can also add Gist by placing just the Gist ID, in this case, 8d1f21df58d77b4d2f7b, in between gist shortcode. For more details go to Embed Github Gist Following is using the gist shortcode:
https://gist.github.com/SQLGear/8d1f21df58d77b4d2f7bIn order to add the above gist, we need to remove the username of the Github.com account from the URL. In the above URL, the user name is SQLGear. So remove the username and one of the forward slash (/) which is either before or after the username making sure we do not have the double forward slash in the resulting URL. The resulting URL will look something like below:
https://gist.github.com/8d1f21df58d77b4d2f7bAdding the resulting URL into your blog editor will place the Gist as below:
You can also add Gist by placing just the Gist ID, in this case, 8d1f21df58d77b4d2f7b, in between gist shortcode. For more details go to Embed Github Gist Following is using the gist shortcode: