Listing posts grouped by meta_key from usermeta table
-
I’m designing a photography contest website. The configuration is this:
- Each participant is member of a club, so in the usermeta table every user has a ‘club’ metakey with the name of the club as meta_value.
- Each participant uploads an image (with a custom post type) which is given a score. This score is a custom field saved in the postmeta table with a ‘score’ meta_key and the number scored as a meta_value.
So, what I’m trying to do with no success is to make a list:
- with the clubs ordered ascendent alphabetically
- inside the club with the 5 best scored images from members of this club ordered descendent by score
Something like this example:
Club AAAAA
- Image 1 – 20 points
- Image 2 – 19 points
- (…)
- Image 5 – 13 points
Club BBBBB
- Image 1 – 20 points
- Image 2 – 19 points
- (…)
- Image 5 – 13 points
I hope I have been able to explain.
Thanks for your help.
álex.
- The topic ‘Listing posts grouped by meta_key from usermeta table’ is closed to new replies.