• Hello,
    I am working on a little project, basically what I would like to do is create a dynamic about page, which takes all users in a user group and print their biographies, names and a picture in a neat manner. My biggest issue is my unfamiliarity with PHP and the wordpressAPI.

    I envision my loop working similarly to the posts loop however I am unsure of how to go about fetching this user data (what functions exist if any to do so, etc.)

    Any guidance here would be highly appreciated.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Use get_users() to get an array of user objects matching parameters you specify. Run a foreach loop on the returned array to step through each user object, from which much of the basic information can be obtained. Anything beyond that will depend on where and how the data is stored, but using get_user_meta() will get most additional data you need.

Viewing 1 replies (of 1 total)

The topic ‘How to write a "for" loop’ is closed to new replies.