Skip to:

Control Post Gravatar Link…

  • reference:

    how do i control what the avatar, usename and “member” title… all link too.

    the post.php file uses these three respectively… but i cant control the url of these links… i need the gravatar to link to the members profile rather than the users website.

    <?php post_author_avatar_link(); ?>

    <?php post_author_link(); ?>

    <?php post_author_title_link(); ?>

Viewing 6 replies - 1 through 6 (of 6 total)
  • help please

    Sam Bauers


    Put this into your themes functions.php file and call it at will. It may screw up with pingback posts, not sure though.

    function my_post_author_avatar_profile_link( $size = '48', $default = '', $post_id = 0 ) {
    if ( ! bb_get_option('avatars_show') )
    return false;

    $author_id = get_post_author_id( $post_id );
    if ( $link = get_user_profile_link( $author_id ) ) {
    echo '<a href="' . esc_attr( $link ) . '">' . bb_get_avatar( $author_id, $size, $default ) . '</a>';
    } else {
    echo bb_get_avatar( $author_id, $size, $default );

    never had a pingback before, and not sure how it looks, but ill give the above code a try.

    There isn’t a functions.php file in any theme, nor in kakumei and in my own theme which is based off of kakumei.

    Sam Bauers


    Then add one. It’ll get included automatically by bbPress.

    Works fine, in 1.x series.

    Just use the function <?php my_post_author_avatar_profile_link(); ?> in your post.php

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar