15 comments on “Creating a Member List

  1. Pingback: WordPress Tip: Change Contact Info in User Profile | WP TIPS

  2. Are you using a specific membership plugin with the member directory you created for this site? I see that you have 4 pages or categories under members login “rehearsals, rules-regulations, directory, & documents”.

    Great post thanks!

  3. thanks for the tutorial but am having trouble with paginations, I see 10 people per page, but I do not know how I can continue, can you help?

    • That’s strange indeed, it should show all members! Without being able to see your code, it’s quite impossible to say what could trigger this behaviour. Any chance that you can show it on pastebin or something?

      • hello and sorry for my English, I explained badly. I would like 10 users per page, but I can not pagination to custom page? virtually all users can write articles on my site and list of contributors is long. You have a solution?

        • ok, understand you now. You would have to find a way to include the call to pagination into the function. Maybe the Codex can help you further?

  4. the problem is that they are expert in PHP and I do not know how …. would be really great if you wrote a tutorial about …

  5. Is there a way to exclude two admins? I tried adding….

    if ($auser[‘nicename’] != ‘admin’) && $auser[‘nicename’] != ‘admin2′)

    …but it did not work

    • Have you tried to use || instead of &&? I also noticed that in your code above you use curly quotes instead of single quotes around admin, that could also be the problem…

      • Thanks. I was not very clear, but using && in my customized code the first admin nicename is excluded just as it was before I added,the second condition, it is the second one that is being ignored. I did try a double pipe || but when using it neither name is excluded. In a past similar situation, && has worked just fine. I can’t figure out why it does not work here. I must be forgetting something.

        • A little bit late, but for future reference
          Add the following code
          ‘id’ => $user->id,

          and then in your if statement write
          ($auser[‘id’] != ‘4’ && $auser[‘id’] != ‘1’)

          Of course replace the numbers with the users you wish to hide!

  6. Great bit of PHP that is coming in handy, I’ll post a link to the project that is using this code once it has gone live.
    For those who are looking at the above code, please note it can also be used in conjunction with custom user fields, to give your author cards thats extra little touch!

Comments are closed.