WordPress: Instagram Feed Shortcode

You can use this shortcode to display your Instagram feed in and post/page.

Please note: this is intended for use within posts/pages and should not be used in the sidebar or in a widget. We recommend the Instagram widget or customizer options for that instead.

How to use this shortcode

1. You will first need to connect your site to Instagram.

2. Now you can copy the following shortcode into any post/page:

This shortcode will display a grid of your recent Instagram posts like the example below:

By default, images are cropped into a square. If you would like the images to appear in their original shape (e.g squares or rectangles) you can add the “shape” parameter. For example:

This would display a grid like the example below:

PS. The images we’ve used in this example are from Emily’s Instagram feed. Go check her out!

You can also show the feed of a different Instagram account by adding the Access Token to the shortcode. For example:

You can also limit the number of images displayed by using:

If you’d like any new Instagram features you’re welcome to suggest this in the comments below 🙂

Was this article helpful?


  1. Dawn

    Can I post from the blog directly into instagram and pinterest?

    1. Phil (pipdig)

      Hi Dawn, I don’t think this is possible, however there might be a plugin available to do it. I think it would require a third party hosted service though, since Pinterest and Instagram don’t provide that type of feature directly.

      1. Dawn

        Quick question: How do I get my most recent post to display first? In chronological order?

        1. Phil (pipdig)

          Your most recent post should display automatically. If it is not, then this might mean that some of your posts are set as sticky perhaps?

  2. Heather | thedomesticdiva.org

    Hi Phil,
    Quick question: is there a shortcode to display the feed for a particular hashtag on a wordpress page (instead of a profile)?
    Thanks for your help.

    1. Phil (pipdig)

      Hi Heather, that’s not possible with this particular shortcode. However I think it is possible with this plugin.

  3. Sandra

    Hi phil,

    I just changed my instagram name and re-connected my instagram account to my blog but i still see my old username displayed. How can i update this?

    1. Phil (pipdig)

      Hi Sandra, have you also changed the link to your Instagram profile under ‘pipdig > Social Links’?

Leave a comment

Please include a link to your site with every comment. It will help us to give specific and more personalized answers to any questions you have. The link to your website will be visible to support staff only. It will not be shown publicly.