WordPress.org

Support

Support » Plugins and Hacks » Is it possible to create a page for featured users?

Is it possible to create a page for featured users?

Viewing 1 replies (of 1 total)
  • Used in conjunction with the Custom User Profile Photo plugin, this is what I use inside the Loop to display featured users. On this site, there is only ever going to be one featured user, so this code displays in one column on the page. You’ll want to edit the gic_mom style to suit your theme. If you’re not using the photo plugin, just cut out the parts that fetch and display the image.

    `<!– display member of the month user information –>
    <?php
    $featured = get_users(‘blog_id=1&meta_key=jsIs_user_featured&value=yes’);
    foreach ($featured as $user) {
    $user_info = get_userdata($featured);
    $first_name = $user->first_name;
    $last_name = $user->last_name;
    $user_bio = apply_filters(“the_content”,$user->description);
    $user_img = $user->cupp_upload_meta;
    if ($user_img) {
    $user_photo = ‘<img src=”‘. $user_img .'” class=”alignleft” alt=”‘. $first_name .’ ‘. $last_name .'”>’;
    }
    ?>
    <div class=”gic_mom”>
    <?php echo ‘<h5>’ . $first_name .’ ‘. $last_name. ‘</h5>’; ?>
    <?php echo ‘<p class=”entry-content”>’.$user_photo.’ ‘. $user_bio. ‘</p>’; ?>
    <div style=”clear: both;”></div>
    </div><!– end gic_mom –>
    <?php } ?>`

Viewing 1 replies (of 1 total)
  • The topic ‘Is it possible to create a page for featured users?’ is closed to new replies.