Support » Plugin: Instagram for WordPress » [Plugin: Instagram for WordPress] inserting shortcode into a post to work like the widget

  • hi,

    I want to know the shortcode to make this plugin work exactly like the widget….

    I want to insert this into a post and have the fade displaying different images for a specific hashtag.

    When i use the shortcode in the description;

    ([instagram url=’http://instagr.am/p/BSJRn/’ size=’large’ addlink=’no’])

    it only displays one specific static image. Does anybody know how to alter this code to display all images from #example hashtag and fade into one and other.

    Hope thats clear enough. (2:30am here and im basically sleep typing)

    Any help would be appreciated

    http://wordpress.org/extend/plugins/instagram-for-wordpress/

Viewing 2 replies - 1 through 2 (of 2 total)
  • the world

    (@the-world)

    I have the same issue. There is only 1 static image that shows up all the time. No other url works. Has anyone found a solution to this yet?

    To be more specific:

    I am using something like this: – which is not working
    <?php echo do_shortcode(‘[instagram url=”http://instagram.com/p/ZGWAFkP3n4/” size=”medium” addlink=”no”]’); ?>

    Only the line of code given on the plugin page works:
    [instagram url=’http://instagr.am/p/BSJRn/’ size=’large’ addlink=’no’]

    Why is it that one url works and not any other?

    Any suggestion welcome.

    Thanks.

    the world

    (@the-world)

    Solved!

    The issue was with the regular expression matching in the plugin file

    In the plugin file instagram-for-wordpress/wpinstagram.php the function
    function instagram_embed_shortcode was checking for a regular expression instagr.am which meant that any url which is something like instagram.com was not validated. So I changed that to

    if(($url != ”)&&((preg_match(‘/^http:\/\/instagram\.com\/p\/[a-zA-Z0-9-_]+\/$/’, $url))||(preg_match(‘/^http:\/\/instagr\.am\/p\/[a-zA-Z0-9-_]+\/$/’, $url)))):

    It works fine now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Instagram for WordPress] inserting shortcode into a post to work like the widget’ is closed to new replies.