• Resolved mzah8

    (@mzah8)


    So I did give a positive review of this plugin a week ago, but I noticed a few things afterwards..

    The shortcode I’m using:

    [wp_pinboard user=”hide” date=”hide” count=”5″ orderby=”random”]https://pinboard.in/u:username/t:tag1/t:tag2/[/wp_pinboard]

    And another one with different tags but exactly the same parameters.

    1) Count: These actually show 6 pins instead of 5.

    2) Order By: It seems to take my most recently pinned 6 items (matching the tags), then within the results, it randomises the order. My understanding of the “order by” parameter is that it would randomly pull any 6 items (matching the tags) and give me those results. Was this how this parameter is intended to work?

    Thanks a lot.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Josh Stauffer

    (@joshstauffer)

    Thanks for the heads up.

    1) This appears to be an issue with the Pinboard.in API. The count parameter is not having any affect on what is returned at the moment. Consider: https://feeds.pinboard.in/text/popular/?count=5

    2) The order by in this case just randomizes the result set. If the count is 5, it will pass this on to the API, the API will return 5 bookmarks, and then the plugin will randomize the order. It was designed this way for performance reasons. To randomize the way you are understanding would require the plugin to request 400 bookmarks, then randomize the result, then only display 5 bookmarks.

    Hope this helps.

    Thread Starter mzah8

    (@mzah8)

    Thank you for the quick reply!

    1) Wow, that page actually shows 100 bookmarks. In my case, I checked my own feed and using ?count=5 gives 6 items, while ?count=4 gives 5. So I guess I can change my count parameter accordingly to show exactly 5.

    2) I see, that makes sense. I would really like to show a random selection of my bookmarks, but I suppose I might have to find some other way.

    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Order by Random; Count 5 actually shows 6’ is closed to new replies.