Page of Authors Problem
-
I’m desperately trying to figure out why the User Photo plugin isn’t working.
I’m creating a page of profiles (similar to a page of posts). I’m using the User Photo plugin to call my user profile pictures. Here’s my code, thus far:
<?php get_header(); ?> <div id="inside-content"><?php if(have_posts()) : while(have_posts()) : the_post(); ?> <h2 id="inside-h2" class="chunk orange"><?php the_title(); ?></h2> <?php the_content(); ?> <?php endwhile; endif; ?> <div id="ap-content"> <?php // Get the authors from the database ordered by user nicename global $wpdb; $query = "SELECT ID, user_nicename from $wpdb->users ORDER BY user_nicename"; $author_ids = $wpdb->get_results($query); // Loop through each author foreach($author_ids as $author) : // Get user data $curauth = get_userdata($author->ID); // If user level is above 0 or login name is "admin", display profile if($curauth->user_level > 0 || $curauth->user_login == 'admin') : // Get link to author page $user_link = get_author_posts_url($curauth->ID); // Set default avatar (values = default, wavatar, identicon, monsterid) $avatar = 'wavatar'; ?> <div class="project"> <h3 class="project-title chunk"><a href="<?php echo $user_link; ?>" title="<?php echo $curauth->display_name; ?>"><?php echo $curauth->display_name; ?></a></h3> <h4 class="orange chunk"><?php echo $curauth->subtitle; ?></h4> <a href="<?php echo $user_link; ?>" title="<?php echo $curauth->display_name; ?>" target="_self"><?php userphoto_the_author_photo(); ?></a> </div> <?php endif; ?> <?php endforeach; ?> <div class="clear"></div></div><!-- end #ap-content --> <div class="clear"></div></div><!--- INSIDE-PAGE --> <div class="clear"></div></div><!-- CONTENT --> <div class="clear"></div></div><!-- MAIN --> <?php get_footer(); ?>
I can’t get the User Photo plugin to call multiple, different users’ photos. Currently it’s just calling in the user’s photo who created the page (me).
Thoughts? Help? (Preemptive) thanks!
PS. I don’t know if this is appropriate, but I’m willing to pay for the help (paypal).
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘Page of Authors Problem’ is closed to new replies.