The ‘special’ authors have in usermeta a meta key called
‘werksortgodmodus’ with meta value ‘yes’. The ‘rest’ of the authors
have ‘werksortgodmodus’ = no .
You could e.g. order by the meta value with (PHP versions 5.4+):
$blogusers = get_users(
[
'role' => 'author',
'meta_key' => 'werksortgodmodus',
'orderby' => [ 'meta_value' => 'DESC', 'display_name' => 'ASC' ],
]
);
where we order first by the werksortgodmodus
meta value and then by e.g. display_name
.
We use the DESC
order so that the yes
values come before the no
values.
If you got huge number of users, then you might want to use query pagination.
Related Posts:
- If Else Gravatar Author Picture
- get_the_author_meta( $field, 0 ) returns the administrator $field
- Author custom fields post meta, the code?
- How can I get the author description’s excerpt?
- Filter Author Bio
- How to use Buddypress xProfile field as WordPress Bio
- Display author name, outside the loop, if they haven’t published a custom post
- Difference between last_name and user_lastname
- Getting list of top 10 users and sort on last name
- get_the_author_meta not working
- Display a list of all post from the Author in the author’s page (author.php) in alphebetical order
- Creating a button from data from Author meta
- WordPress Author Information show paragraph?
- the_author_meta not resetting
- Removing “HTTP://” From the_author_meta?
- How to get a buddypress user profile link and a certain user profile field for the current post author?
- How to get author’s name by author’s id
- Give Author users the right to embed
- How can I publish a post with two or more authors?
- How to order users alphabetically by their last name?
- What’s a good way to put authors into groups
- Permalink to user profile
- Show Author in custom rss feed
- What is the difference between user_description and description?
- Authors details such as social media links, emails etc → Is this Meta or something else?
- How to get posts without author?
- Allow Content Author to Publish, But Not Edit or Delete
- Get only the author profile picture image url inside a loop
- Is it possible to set/override default the_author_posts_link to login name?
- Get the excerpt for a post created by the related author
- get the username of a user in his author page
- hide something in single page if current author has only one post
- WP authors page
- Send transactional email: first user’s post
- Show woocommerce products in author archive
- Author website URL
- How to update author display name on blog posts based on user role
- If post author ID is..show that
- Getting $curauth->ID to work inside a shortcode
- Link Author’s Website in Author Bio
- Modifying Author Link to add Author Meta in URL
- Remove admin role from the “Author” user listing on individual post screen
- How to set post author to custom post field via front-end form?
- Author List page: Exclude based on last post date not working correctly
- Author list based on recently active
- Authors & profiles (and exclude ID’s)
- Author name is not working on category page
- How do I create WordPress Authors Dropdown with links
- How to restrict an author scheduling their post date to a maximum X days ahead from the current date
- Display A list of Admins
- Different posttypes for different authors
- Remove author bio from posts of a specific author
- Create an Author Page on Registration
- Author’s Id from wp list authors function
- author_link filter not work correctly
- Disable WordPress Comment Author Name
- Author Box Meta Issues
- Condition within single.php to send an email to the post author
- Unpublish Authors With not Fulfilled Fields
- query post by author gender
- Display All Authors only
- How to conditionally output to sidebar of each author’s archive and posts by each author?
- ACF Relationship – Exclude pages not created by author
- Display Authors avatars when more than one author
- How to reorder the content of the single post?
- set post author depending on condition via frontend post submit
- Can’t change author to myself after post published
- Author page points to 404 error page
- If statement for is_author of a post
- WordPress Authors not showing with User Submitted Posts plugin
- Authors to be able to customize their author pages?
- Check For get_post_meta on Author Archive Page
- How to target a post by a sepecific author?
- List of all authors avatars
- Get top authors for the last 30 days with posts count and avatar
- How to fix a specific page (author archive) loading speed?
- When clicking on author, it shows my email address in url
- author.php not showing content if Author has no Posts
- How do I edit disclaimer/contact information?
- Yoast SEO plugin open graph add meta tag to fetch Avatar from Author Page
- Best way to query posts and order by relevancy to query
- Open the_author_link() in a new window
- How to remove author from Social sharing links?
- WordPress author box
- Automatically Populate Post Taxonomy Data Based on Post Author Meta Data?
- How to add authors contact info to author metabox in post editor?
- Variable undefined but it is defined
- Show author name not the author ID
- Author page link in comments is different than in posts?
- Sort users by custom user meta value
- Php markup question: php/html within conditional bit
- Change Post and CPT author on the fly while publish the post
- Multiple Authors on a Single Blog
- Want to add a custom author link to a single.php
- Show the most recent post for an author on the author page
- Uncode theme, create author page and author link under the blog
- How to display Author Profile based on Custom field value
- Can’t sort custom column on user.php by number / meta_value_num?
- How to load locally saved author photos based on author ID
- How to add avatar to authors list?