BlogTutorials

How to Easily Embed Instagram in WordPress with oEmbed

Before now now we’ve confirmed you learn the way to embed videos, slideshare, and soundcloud in WordPress using oEmbed. One among our clients requested if there was a way to easily embed Instagram in WordPress with oEmbed. The reply is YES. On this text, we’re going to current you learn the way so as to add instagram oEmbed assist in WordPress.

Exchange: You DO NOT should make use of this tutorial anymore. WordPress 3.5+ has built-in oEmbed assist for Instagram.

All you should do is open a clear .php file and identify it wpb-instagram.php. Then copy the code below and put it apart in there. Add the file into your plugins folder, and simply activate the plugin.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
/*
Plugin Establish: WPB Add Instagram oEmbed
Description: Supplies oEmbed assist for Instagram
Author: Syed Balkhi
Author URI: https://www.wpsaviour.com
*/
// Add Instagram oEmbed
carry out wpb_oembed_instagram(){
wp_oembed_add_provider( 'http://instagr.am/*/*', 'http://api.instagram.com/oembed' );
wp_oembed_add_provider( 'http://www.instagram.com/*/*', 'http://api.instagram.com/oembed' );
}
add_action('init','wpb_oembed_instagram');

Now all you should do is paste the instagram image URL in your WordPress submit by itself line. It will robotically embed the image, and improve. That’s how simple it is.

Download The WPSaviour App Now

Related posts
Tips

WordPress oEmbed: Embed (Almost) Everything Into Your Site

Best WordPress PluginsBlog

How to Add Videos and More in WordPress Comments with oEmbed

BlogTutorials

How to Enable oEmbed in WordPress Text Widgets

Leave a Reply

Your email address will not be published.

Pay in your preferred currency
Indian rupee
Euro