Is there a way to set up a User rating system for Users? I’ve seen several topics about creating a rating system to rate post types, but I am hoping to find something that will allow users to rate other users.
I am hoping to find something that will allow users to rate other users.
This sounds fairly complex. In theory you could accomplish it with a combination of custom post types, custom fields, CRED forms, and custom code. I don't have any simple instructions for you here, as you can see from other posts about ratings there is no simple solution. I think if I were trying to accomplish this I would look for a 3rd party plugin that handles ratings first. If you have exhausted all your options there, then I would consider implementing a custom system with Types and CRED. A few things you would need to make it work:
- A custom post type for Votes, that stores the voted user's ID along with the voting user's ID (assuming a user can only vote once for another user, and/or has the ability to modify their vote later)
- A custom post type that acts as a parent for all the Votes for a specific User
- A User custom field that links the parent vote container post to the User
- Some custom code that creates this parent vote container post automatically whenever a User is created
- A CRED form that allows users to create a new Vote for another User. This Vote will be a child of the other User's parent vote container post.
- A custom display that shows the current average rating and number of Votes for a specific User, generated using your own custom mathematical equations and custom shortcodes
- Depending on how many of these ratings you plan to show on a page, you might also need to consider creating your own cache. Use additional User custom fields that save calculated rating averages and number of votes whenever a vote is counted - this will prevent a lot of unnecessary math and help speed up load times. You can use the cred_save_data hook for this.
This is just a preliminary list of things you might need to consider when starting your own ratings system, but it's a good way for you to start to think about the full scope of the work. Let me know your thoughts.