Display site administrator’s id by current blog id inside link
If you want to construct for example: http://example.com/?ref=1,8,22 for multiple administrators of the current sub site, you can try the following (untested): $uids = get_users( array( ‘blog_id’ => get_current_blog_id(), ‘role’ => ‘administrator’, ‘fields’ => ‘ID’, ‘order_by’ => ‘ID’, ‘order’ => ‘ASC’, ) ); echo $url = add_query_arg( array( ‘ref’ => join( ‘,’, $uids ) ), … Read more