Image on Author List page
-
Hi!
First, I would like to thank you for your work on this plugin… it is very well thought out.
I have created a author list page which shows a list of all the wordpress site authors, a description.. and an image.
I tried pasting the code provided with the plugin, but it is not displaying any images. Here is what I have so far:
<?php /* Template Name: Display Authors */ ?> <?php get_header(); ?> <?php // 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; } } ?> <section class="content" role="main"> <?php printf('<h1>%s</h1>', the_title()); foreach($users as $user) { ?> <div class="authorlist"> <div class="authorlstleft"> <h2 class="authorName"><?php echo $user->display_name; ?></h2> <div class="authorimagelst"> <?php // Retrieve The Post's Author ID $user_id = get_the_author_meta('ID'); // Set the image size. Accepts all registered images sizes and array(int, int) // Get the image URL using the author ID and image size params $imgURL = get_cupp_meta($user_id, 'thumbnail'); // Print the image on the page echo '<img src="'. $imgURL .'" alt="">'; ?> </div> </div> <div class="authorlstright"> <p class="authorDescrption"><?php echo get_user_meta($user->ID, 'description', true); ?></p> <p class="authorLinks"><a href="<?php echo get_author_posts_url( $user->ID ); ?>">View Author Links</a></p> <p class="socialIcons"> <ul> <?php $website = $user->user_url; if($user->user_url != '') { printf('<li><a href="%s">%s</a></li>', $user->user_url, 'Website'); } $twitter = get_user_meta($user->ID, 'twitter_profile', true); if($twitter != '') { printf('<li><a href="%s">%s</a></li>', $twitter, 'Twitter'); } $facebook = get_user_meta($user->ID, 'facebook_profile', true); if($facebook != '') { printf('<li><a href="%s">%s</a></li>', $facebook, 'Facebook'); } $google = get_user_meta($user->ID, 'google_profile', true); if($google != '') { printf('<li><a href="%s">%s</a></li>', $google, 'Google'); } $linkedin = get_user_meta($user->ID, 'linkedin_profile', true); if($linkedin != '') { printf('<li><a href="%s">%s</a></li>', $linkedin, 'LinkedIn'); } ?> </ul> </p> </div> </div> <?php } ?> </section> <?php get_footer(); ?>
Any help would be greatly appreciated!
Thank You,
Dannyhttps://www.ads-software.com/plugins/custom-user-profile-photo/
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Image on Author List page’ is closed to new replies.