• I have installed the User Photo plugin. The only place I want the photo to display is on the author page. I have tried using <?php userphoto($wp_query->get_queried_object()) ?> to pull it into the template as the plugin home page instructs, but this brings up nothing.

    Here is the code for my author template, can anyone help?
    <?php
    /*
    Template Name: Author Template
    */

    global $wp_query;
    $curauth = $wp_query->get_queried_object();

    $key=”wpum_”.”business_name”;
    $business_name = get_usermeta($curauth->ID, $key);

    $key=”wpum_”.”owner”;
    $business_owner = get_usermeta($curauth->ID, $key);
    ?>

    <?php
    if(isset($_GET[‘author_name’])) :
    $curauth = get_userdatabylogin($author_name); // NOTE: 2.0 bug requires get_userdatabylogin(get_the_author_login());
    else :
    $curauth = get_userdata(intval($author));
    endif;
    ?>

    <?php get_header(); ?>

    <div class=”post_box”>
    <div class=”post_content”>
    <h2><?php echo $business_name; ?></h2>
    <?php if ($business_owner != null) { echo “<p>The owner of this business is “.$business_owner.”</p>”; }; ?>
    <p>Website: user_url; ?>”><?php echo $curauth->user_url; ?></p>
    <p>Email: user_email; ?>”><?php echo $curauth->user_email; ?></p>
    <p>About:
    <?php echo $curauth->description; ?></p>
    <?php userphoto($wp_query->get_queried_object()) ?>
    <dl>
    </div>
    </div>

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘User Photo Plugin – On the author page’ is closed to new replies.