Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of WordPress action for WordPress User Query filter on author of specific post type.
$user_query = new WP_User_Query( array(
'orderby' => 'ID',
'prefix_post_type' => 'blog'
) );
$users = $user_query->get_results();
foreach ( $users as $user ) {
echo $user->display_name, '<br />';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment