Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author mr_speer

    (@mr_speer)

    Hello!

    The good news is, I just tried your shortcode and was able to get it to respect the limit, so hopefully we should be able to resolve this. Could you give me a little more info?

    – Is it showing more or less than 24 images?
    – If it’s showing less than 24 images, can you verify that your account has at least 24 images to show?
    – If you define another user, does it adhere to the 24 limit?

    Let me know and we’ll try get to the bottom of this!

    Thanks!

    mr_speer

    Thread Starter jamesn81

    (@jamesn81)

    Sorry, I left out that I’m also using a tag in the code. I pasted an earlier version of it from my clipboard.

    Let’s say it’s “hipster”

    [si_feed link=false tag=hipster width=160 limit=24]

    I can see more than 24 images … the tag has more than 24 images.

    Hope that helps!

    Plugin Author mr_speer

    (@mr_speer)

    Thanks for the further information! I’m having a hard time replicating the problem in my environment; I used the tag as posted and it is displaying the proper amount of images.

    It could perhaps be a difference in our dev environments. Could you possibly post a link to a demo page that shows the issue? That might help me troubleshoot further.

    Thanks for your patience! Hopefully we can get everything sorted.

    Thanks!

    mr_speer

    Thread Starter jamesn81

    (@jamesn81)

    Ok sure – the Instagram gallery should be appearing here:

    https://www.jamesnorthproductions.com.au/#gallery

    It’s showing 30 images at the moment (that’s how many are in my tag of jnpstudio)

    I’ve set the limit at 24 and it’s not adhering to it.

    My code pasted from my page is:

    [si_feed link=false tag=jnpstudio width=160 limit=24]

    The user is james_north

    Plugin Author mr_speer

    (@mr_speer)

    Great news! I was able to locate the issue.

    From what I can tell, this is an issue on Instagram’s end. For some reason, the limit isn’t always respected for tag queries. I’ve found posts of other people reporting the same issue, so it seems pretty well documented as a bug.

    The good news is that I’ve created a little fix for it that should suffice for the time being. If you’re comfortable with doing a simple edit to the plugin yourself, you can edit the file at includes->simple-instagram-shortcodes.php. Paste the following code at line 22:

    if(count($feed->data) > $limit){
    	 $total = count($feed->data);
    	 $diff = $total - $limit;
    	$start = $total - $diff;
    	for($i=$start; $i <= $total; $i++){
    		unset($feed->data[$i]);
    	}
    }

    It’ll go after the line if(($feed) && count($feed->data) > 0){ and before the line $return = '<div class="si_feed">';

    Otherwise I’ll be pushing a new version with this fix included here shortly, so you can update instead.

    Thanks for your help in getting this nailed down!

    mr_speer

    Plugin Author mr_speer

    (@mr_speer)

    The new version has been pushed, so if you update to version 1.1.1, you should be good to go. Let me know if this resolves it for you!

    mr_speer

    Thread Starter jamesn81

    (@jamesn81)

    Perfect – all working.

    Thanks for checking it out!

    Thread Starter jamesn81

    (@jamesn81)

    Oh I also meant to check about the order of tagged images ??

    Currently the oldest photo is appearing at the top of the stream.

    I wonder if they’re sorted by date, or age of tag? The reason being, I created a unique tag for the content, and went through the pictures I wanted tagged from newest to oldest and tagged them. So theoretically, the tag is oldest on the newest photo (scrolling down through the images).

    Can it be reversed, and is this problem also unique to tags?

    Plugin Author mr_speer

    (@mr_speer)

    Great! I’m glad that it all worked out for you.

    As far as the order of photos, here’s a quote directly from Instagram regarding the tag option:

    …Get a list of recently tagged media. Note that this media is ordered by when the media was tagged with this tag, rather than the order it was posted.

    So it looks like that’s the order in which it is displayed.

    I’ll note the issue as a possible feature request for future versions, but for now since you reported the originally issued as solved I’m going to mark this thread as resolved.

    Thanks!

    mr_speer

    The fix didn’t solve my problem.
    I want the feed to be unlimited and have set the limit to 1000. But only 32 show ??
    Help?

    [si_feed width=215 link=true tag=9000ifarver limit=1000]

    https://vaerk9000.dk/9000ifarver/

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Limit image number’ is closed to new replies.