Support » Plugin: Custom Content Shortcode » Pick Random Users

  • Anton_Th


    I’d like to feature 4 randomized subscribers on a page, different at each page load.

    Is there another param (‘randomized’?) that could be used to take 4 random picks instead of the first four?

    Thanks in advance!

    Obviously this doesn’t work:

    [users role=member orderby=rand count=4][user avatar]
    [user dct_position]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Peter Berger


    What happens when you use order=rand instead of orderby=rand?

    Thread Starter Anton_Th


    You’re a genius.
    Can’t imagine that I overlooked that feature…!
    Thanks so much!

    Thread Starter Anton_Th


    Oops Peter – That didn’t work: it now takes the LAST 4 (alphabetically)…. 🙁



    That does not work for users – only for loop

    See documentation for user:

    orderby – id, name, login (default), email, url, registered, post_count, field, field_num
    order – ASC – alphabetical (default) or DESC (new to old)

    Thread Starter Anton_Th


    @polarracing thanks! order=rand does however do something, it lists alphabetically descending, so from Z-A. (not documented afaik).
    I’m trying to get it done in a php snippet now.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.