Lead Generation Marketing Agency Lead Generation Marketing Agency
  • Marketing Calculators & Tools
    • Free Online Marketing Report
    • Lead Generation Campaign Breakeven Calculator
    • Ads Conversion Value Calculator
    • Recommended Marketing Spend Calculator
    • HighLevel: A2P 10DLC Registration Template
    • Proration Calculator
  • Websites
    • Free Privacy Policy Generator
    • Website Accessibility Tax Credit
    • Fastest WordPress Hosting
    • Gravity Forms Tips
    • Perfect Gravity Forms SPAM Blocking
    • Plugins
    • How to Think about SEO
  • Portfolio
  • Blog
    • Cloudflare Setup
    • Marketing Learned from Jesus
    • Accept Payments w/o Subscription
    • Spy on your Competitors’ Google Ads
  • Contact Us
  • Book Appointment
  • LeadGen Agency Education
    • HighLevel Tips
    • Our GHL YouTube Playlist
    • All GHL Terminology
    • Common High Level Software Questions and Why to Choose GHL
    • Value-Based Pricing Notes
    • Custom Photo Gallery on HighLevel (GHL) Websites
    • Automatically Blocking Social Media Spam DMs in HighLevel

At Least 5 Ways to Embed Gists in WordPress

By Clifford P on March 6, 2014

As of January 25, 2014, Jetpack incorporated the Gist Shortcode from WordPress.com. The new [ gist ] shortcode works as of Jetpack v2.9 (released January 26, 2014).

I’m glad they did this, but there were quite a few popular WordPress plugins that were already using the [ gist ] shortcode, which may cause a conflict and cause your code snippets to not be working.

For me, the gists didn’t display at all. There weren’t any stray brackets laying around because the shortcode was detected, just not being used correctly.

So, if you have Jetpack active on a site (with Shortcode Embeds active), deactivate and delete whatever gist shortcode plugin you were using and learn the Jetpack version (also works on WordPress.com):

Table of Contents

Toggle
  • 5 Ways to Embed Gists with Jetpack v2.9 and later
    • 1) oEmbed (no shortcode)
    • 2) Wrap the full URL in a shortcode
    • 3) Shortcode with just the ID
    • 4 & 5) How to display a single file from a Gist

5 Ways to Embed Gists with Jetpack v2.9 and later

1) oEmbed (no shortcode)

Example: 

https://gist.github.com/cliffordp/1234567
view raw oembed.txt hosted with ❤ by GitHub

Make sure it’s on its own line, and if it’s the last line of a post/page, you’ll need to add another line or wrap it in a shortcode.

2) Wrap the full URL in a shortcode

Example: 

Notice the space after the link and before the closing bracket.

It’s safer than relying on WordPress oEmbed to detect it because it’ll work even if you don’t put it on its own line or if you have it as the very last line in your post/page.

3) Shortcode with just the ID

Example: 

Most plugins used something like but the id="" part isn’t needed/allowed in Jetpack’s shortcode.

4 & 5) How to display a single file from a Gist

Example 1: 

Example 2: 

I prefer Example 1, but you can use whichever method you prefer.

They all work in Jetpack v2.9 and later.

Posted in Advice/Tips/How-To.
PreviousWordPress.com Jetpack REST API Console
NextWP Engine Staging Site’s Own wp-config.php Rules

1 replies to “At Least 5 Ways to Embed Gists in WordPress”

  1. Pingback: oEmbed Gist into WordPress - WordPress Teacher Zac Gordon

Comments are closed.

  • For your review: our Policies and Contact Information

    Copyright © 2010–2025 · Log in

    Made with by Clifford Paulick

  • Lead Generation Marketing Agency–Always Improving Since 2010
  • Free Marketing Calculators & Tools
    • Lead Generation Campaign Breakeven Calculator
    • Free Online Marketing Report
    • Recommended Marketing Spend Calculator
    • HighLevel: A2P 10DLC Registration Template
    • Prorate Amount between Two Dates
  • Website Accessibility Tax Credit
  • HighLevel White Label Marketing Software
  • Contact Us
  • Blog
  • Marketing Calculators & Tools
    • Free Online Marketing Report
    • Lead Generation Campaign Breakeven Calculator
    • Ads Conversion Value Calculator
    • Recommended Marketing Spend Calculator
    • HighLevel: A2P 10DLC Registration Template
    • Proration Calculator
  • Websites
    • Free Privacy Policy Generator
    • Website Accessibility Tax Credit
    • Fastest WordPress Hosting
    • Gravity Forms Tips
    • Perfect Gravity Forms SPAM Blocking
    • Plugins
    • How to Think about SEO
  • Portfolio
  • Blog
    • Cloudflare Setup
    • Marketing Learned from Jesus
    • Accept Payments w/o Subscription
    • Spy on your Competitors’ Google Ads
  • Contact Us
  • Book Appointment
  • LeadGen Agency Education
    • HighLevel Tips
    • Our GHL YouTube Playlist
    • All GHL Terminology
    • Common High Level Software Questions and Why to Choose GHL
    • Value-Based Pricing Notes
    • Custom Photo Gallery on HighLevel (GHL) Websites
    • Automatically Blocking Social Media Spam DMs in HighLevel