Get all info Your Users subscribers Or authors in your theme
*Get all info Your Users subscribers Or authors in your theme*
*إظهار كل الأعضاء المسجلين كيفما كانت أذونتهم سواء كانوا كتاب او محررين أو مشتركين أو مشرفين أو مدراء أو باعة أو أي كان *
Created By Brahim Lachgar (Macdawne) http://bralach.com
<?php /* Template Name: Display Authors */ --------------------------------------------------------------- *Get all info Your Users subscribers Or authors in your theme* --------------------------------------------------------------- // Get all users order by amount of posts $allUsers = get_users('orderby=post_count&order=DESC'); $users = array(); // Remove subscribers from the list as they won't write any articles foreach($allUsers as $currentUser): if(!in_array( 'subscriber', $currentUser->roles )): $users[] = $currentUser; endif endforeach; foreach($users as $user):?> <?php echo get_avatar( $user->user_email, '128' ); ?> <?php echo $user->display_name; ?> <?php echo get_user_meta($user->ID, 'description', true); ?> <a href="<?php echo get_author_posts_url( $user->ID ); ?>"> View Author Links</a> <?php $website = $user->user_url; if($website != ''): printf('<li><a href="%s">%s</a></li>', $website, 'Website'); endif; $twitter = get_user_meta($user->ID, 'twitter_profile', true); if($twitter != ''): printf('<li><a href="%s">%s</a></li>', $twitter, 'Twitter'); endif; $facebook = get_user_meta($user->ID, 'facebook_profile', true); if($facebook != ''): printf('<li><a href="%s">%s</a></li>', $facebook, 'Facebook'); endif; $youtube = get_user_meta($user->ID, 'youtube_channel', true); if($youtube != ''): printf('<li><a href="%s">%s</a></li>', $youtube, 'Youtube'); endif; $linkedin = get_user_meta($user->ID, 'linkedin_profile', true); if($linkedin != ''): printf('<li><a href="%s">%s</a></li>', $linkedin, 'LinkedIn'); endif; endforeach;?>