Get_Users Orderby Page

Use WP_User_Query and the has_published_posts parameter to limit results to users who have published the specified post type(s). get_users() is just a wrapper for WP_User_Query(). has_published_posts (boolean / array) – Pass an array of post types to filter results to users who have published posts in those post types. true is an alias for all … Read more

Dynamic User Id

You can use get_the_author_meta() which returns the requested data of the author of the current post. If you’re on the author archive page (e.g. author.php) that will be the ID of the user whose profile you are on. get_the_author_meta( ‘ID’ );