Skip to:
Content
Pages
Categories
Search
Top
Bottom

gravitar and author name link


  • VirtualityStudio
    Member

    @virtualityreiki

    Does anyone know how to change the links of the author gravitar/name to point to their profile instead of to their website? I’ve tried a few different ways of doing this (functions.php etc) and nothing seems to work. Has anyone done this successfully that would like to share?

    In the post.php:

    <?php post_author_avatar(); ?>

    <p><?php post_author_link(); ?>

    <small> <?php post_author_title(); ?> </small>

    is there a way to do this using a href perhaps???? I’ve tried this too… just not with any good results.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)

  • VirtualityStudio
    Member

    @virtualityreiki

    what I have so far is:

    `<div class=”threadauthor”>

    <a href=”http://www.domain.com/forum/profile/<?php post_author(); ?>”><?php post_author_avatar(); ?></a>

    <p>

    <strong><a href=”http://www.domain.com/forum/profile/<?php post_author(); ?>”><?php post_author(); ?></a></strong>

    </p>

    </div>`

    It works for the text link only if the user name is the same as the display name… doesn’t work for the avatar at all. I tried the avatar by putting in the img src before it, and the link works, but it adds an empty box to the left of the avatar. Totally confused :|

    Any ideas?


    mr_pelle
    Participant

    @mr_pelle

    1.1-alpha (trunk) has this option since [2431]


    VirtualityStudio
    Member

    @virtualityreiki

    Thanks mr_pelle!

    I know this is probably the dumbest question most of you have heard, but… how exactly does this work? Does this get copied into each of those files?

    What happens during an update… is this something we need to save and replace after things get updated?


    VirtualityStudio
    Member

    @virtualityreiki

    figured it out:

    in post.php:
    <p><strong><a>"><?php post_author(); ?></a></strong>

    in bb-avatars.php:
    if ( $link = get_user_profile_link( $author_id ) ) {
    echo '<a href="' . attribute_escape( $link ) . '">' . $avatar . '</a>';

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.