Adding Wistia as an oEmbed Provider in WordPress 4.0 & WordPress 4.1

(originally posted on Bring Your Own Design)

With today’s WordPress 4.0 sendout, embedding content from other sites just got way easier. While there is a pretty large list of oEmbed providers, a very important one for us SEOs was left out: Wistia. Don’t worry, though. There is a way to make Wistia videos work the same was with a simple paste of the video URL, much like a YouTube video works.

In your theme’s functions.php, paste the following code:

wp_oembed_add_provider( '/https?://(.+)?(wistia.com|wi.st)/.*/', 'https://fast.wistia.com/oembed', true );

This will let you take the native Wistia video URL, and have the video show up in the Visual editor for easier formatting of the post. It’ll take this:

https://fluiditservices.wistia.com/medias/5yltawbi5t

…and turn it into this (it’s a video from one of our spectacular clients!):

Have any questions? Let us know in the comments!

7 responses

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.