Forums

How to add author name and link to profile page in default theme? (4 posts)

  1. tigerman
    Member
    Posted 3 years ago #

    Can someone point me to the right direction as to how do I go about adding the author name and a link to their profile page when using the default theme in WordPress?

  2. Shane G
    Member
    Posted 3 years ago #

    Hi,

    Refer this:
    http://codex.wordpress.org/Author_Templates

    Thanks,

    Shane G.

  3. tigerman
    Member
    Posted 3 years ago #

    Thanks, I have another question I would like to display the photo of the user/author along with the author name, I checked the URL Codex author templates, it has no field for author picture, so I checked the source for WP admin screen authors & users screen, to see how that displays the user photo and I eventually landed on wp-admin/includes/user.php which has these fields for WP_User
    $user = new WP_User( $user_id );
    $user->user_login = attribute_escape($user->user_login);
    $user->user_email = attribute_escape($user->user_email);
    $user->user_url = clean_url($user->user_url);
    $user->first_name = attribute_escape($user->first_name);
    $user->last_name = attribute_escape($user->last_name);
    $user->display_name = attribute_escape($user->display_name);
    $user->nickname = attribute_escape($user->nickname);
    $user->aim = isset( $user->aim ) && !empty( $user->aim ) ? attribute_escape($user->aim) : '';
    $user->yim = isset( $user->yim ) && !empty( $user->yim ) ? attribute_escape($user->yim) : '';
    $user->jabber = isset( $user->jabber ) && !empty( $user->jabber ) ? attribute_escape($user->jabber) : '';
    $user->description = isset( $user->description ) && !empty( $user->description ) ? wp_specialchars($user->description) : '';

    return $user;

    But there is no field for picture or photo of the user! From where do I get that?

  4. Sathish M
    Member
    Posted 2 years ago #

    i want add two more field in the profile page, how? can anybody explain me?

Topic Closed

This topic has been closed to new replies.

About this Topic