The MU forums have moved to WordPress.org

HOWTO: Link Commentator to his blog? (10 posts)

  1. maka1
    Member
    Posted 15 years ago #

    Hi guys, got a challenging question for you :)

    How do you link the Commentators name to his/her main blog.

    I.e., instead of <?php comment_author_link() ?> in comments.php, show a link to his/her active blog?

    Would appreciate any help.

  2. Klark0
    Member
    Posted 15 years ago #

    commentators don't always have blogs on your MU, So you should encourage them to update their profile properly. Add it to signup maybe ?

  3. maka1
    Member
    Posted 15 years ago #

    yeah, but you cant rely on users in this :)

    it would be nice if the function could check if a user has a blog or not and then display the link to it like this one:

    get_active_blog_for_user($current_user->ID);

  4. andrea_r
    Moderator
    Posted 15 years ago #

    If they are logged in when they leave a comment, it shows their blog.

    Dunno why it's not doing it for you.

  5. maka1
    Member
    Posted 15 years ago #

    hmm, really? in my case the function <?php comment_author_link() ?> just shows the link that they put in their profiles...

  6. andrea_r
    Moderator
    Posted 15 years ago #

    What theme you using?

  7. Klark0
    Member
    Posted 15 years ago #

    I put a message in the dashboard that nags them to update their profiles and what not. It seems to work.

    Thats the easiest way to do it until your users realize that they need to promote their blog. Can't hand hold them for everything :D

  8. andrea_r
    Moderator
    Posted 15 years ago #

    that too. :D

  9. maka1
    Member
    Posted 15 years ago #

    2 andrea: im creating my own theme, thats why... :)

    2 Klarko: saw your cariblogger, really really liked it, among all the crappy websites on wpmu out there, yours stands out... :)

  10. mark-k
    Member
    Posted 15 years ago #

    maka1, you can look at any standard theme to see how they handle a logged in user when generating the comment form. Usually instead of having the name+mail+site fields you see only something like "you are logged in as xxx".

About this Topic