Hi all, quick post to point out that I've reviewed and updated the Instagram embedding guidelines for GV sites. It's nothing too wild, but there has been some confusion and we added a new feature, so I figured I'd go over the main [embed] solution for embedding Instagram, the new hidecaption=1
option for it as well as the new [gv_instagram_feed] shortcode that lets you embed a feed!
Embedding an Instagram post in a story: EASY!
It was always easy, and here's how you do it (Excerpted from the WordPress Posting Guide):
Images and videos from the Instagram sharing service can be embedded using the [embed] code with the URL of a particular item (like many other embed types). For example:
[embed]http://instagram.com/p/trxJ5qQS07[/embed]
That's all you really need! Get the URL of the post and wrap it in [embed]!
BUT there was a secret option all along that we never documented or used before, and we've updated the guide to point it out!
hidecaption=1 is a new feature!
By default the embed shows the image, it's text caption, the like button and the comment button. It's possible to hide the caption by adding hidecaption=”1″ into your[embed] shortcode:
[embed hidecaption="1" ]http://instagram.com/p/trxJ5qQS07[/embed]
This will cause the text and like/comments buttons to be hidden, so only the image, username and instagram icon are displayed.
Neat right? Now you can decide whether you want to show the caption or not! Great for times when the caption has tons of text that you don't need, just make sure you have something in the paragraphs above or below the embed that explains it!
ADVANCED: [gv_instagram_feed] shortcode
NOTE: THIS SHORTCODE HAS BEEN DISABLED AND WILL NO LONGER WORK.
This is a truly new feature, added to GV sites using our custom plugin. It's permanent documentation is on the WordPress Shortcodes documentation. Here's the important part:
[gv_instagram_feed] is replaced with the “feed” for an Instagram account, which ultimately means: show an embed of the most recent image. A
username
argument is required to function.Example Uses
[gv_instagram_feed username='globalvoicesonline']Show the “feed” (most recent post) from an Instagram account. By default hidecaption is true so the caption and like/comments buttons will be hidden.
[gv_instagram_feed username='globalvoicesonline' hidecaption="0"]Show the same “feed” (latest post) but with hidecaption disabled, so the caption shows along with the like and comments buttons.
As you can imagine, [gv_instagram_feed] will rarely be the right choice for including inside a story, since it's bound to change content and won't be predictable. In almost all cases, it would be better to do individual embeds of specific posts that tell your story.
The main reason to use [gv_instagram_feed] is in a widget where you want to promote a specific account, for example the wonderful @globalvoicesonline account, which is shared between GV contributors all around the world!
EXAMPLE REMOVED