WordPress.org

Forums

How do I Orderby User Role? (3 posts)

  1. mikedistras
    Member
    Posted 3 years ago #

    Hi,

    I would like to organise posts by a custom User Role if possible?

    Eg; 2 or 3 custom user roles which would be: User, Premium User, Super Premium User

    So a "super premium user" role's posts would appear first, then "premium user", then "users" after that...

    I have managed to do this manually through separate loops, however this means all the posts would have to be displayed on one page, so having 2 seperate loops would mean pagination wouldnt work as great.

    I hope this makes sense?

    Thanks in advance!

  2. Pioneer Web Design
    Member
    Posted 3 years ago #

  3. mikedistras
    Member
    Posted 3 years ago #

    To get the functionality the client wanted, we created a custom post type that each new user had to create. So I dont need to list the users of the site, i need to list the Custom Posts Type in the order of the Author Role's...

    Super Premium Users, Premium Users and Users
    All have permission to create 1 post in the "Model" Post Type.

    All "Model" post types are displayed on one page - However we want to have all posts written by the "Super Premium User" role grouped 1st, then "Premium User" role 2nd, and "Users" 3rd...

    All this and the pagination to work too... (I know im not asking much :D)

    [ Please do not bump, it's not permitted here. ]

Topic Closed

This topic has been closed to new replies.

About this Topic