I have an odd problem with the author list. I am using the below code in my sidebar to pull in the gravatar and link to author's profile. However, the links it's actually generating are wrong. It just generates links to the page that it's on. So when you're on the blog page, all the author links are www.mysite.com/blog/. Any idea why this could be happening??
<?php $order = 'user_nicename'; $user_ids = $wpdb->get_col("SELECT ID FROM $wpdb->users WHERE ID <> 1 ORDER BY $order"); // query users foreach($user_ids as $user_id) : // start authors' profile "loop" $user = get_userdata($user_id); ?> <li class="clearfix"><?php echo get_avatar( $user->ID, '80' ) . '<a href="' . $user->user_url . '">' . $user->display_name . '</a>'; ?></li> <?php endforeach; // end of authors' profile 'loop'