WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] Link to Author's Profile Page (6 posts)

  1. kakashihatake2
    Member
    Posted 2 years ago #

    Ok, I need some help here now

    Above the content of your post... we can see Posted on "Date" and "Author name" - "No. Of comments"

    ok the thing is.. I want to link the Author's name to their profile.. I am using theme my login and Wp Symposium for social networking. Ok so the thing is... Every user has his/her own id... and so i want to link their name to their profiles.

    For eg
    If you click on the Author's name in
    Posted on "Date" and "Author name" - "No. Of comments"

    we should be directed to their profile page which may be
    http://www.mydomain.com/profile.php?uid="ID"

    Hope to get my problem solved... I tried to look into the WordPress Codex but was unable to find the functions that returns the author id. And also i am not a really good programmer, so don't really have much idea how to code it correctly.

  2. wspencer
    Member
    Posted 2 years ago #

    Look in your template files. Where you want to change the author name to a link to what you have above, find where it says <?php the_author(); ?> and replace it with this...

    <a href="/profile.php?uid=<?php the_author_meta('ID', $author); ?>"><?php the_author(); ?></a>

  3. kakashihatake2
    Member
    Posted 2 years ago #

    Thanks for the reply...

    Sooo... I was able to write the code and link the author of the post to its profile, but i was unable to do so for the comment author... Any tips??

    The commentlist in my theme is shown by
    [code] <ol class="commentlist">
    <?php wp_list_comments('avatar_size=60&type=comment'); ?>
    [/code]

    I can edit the wp-comments.php but I was unable to do so....Can't get the real coding behind it...

  4. kakashihatake2
    Member
    Posted 2 years ago #

    Thanks anyways.... I was able to do the second part myself... :)

    I rock \m/ :P

  5. gbrazell
    Member
    Posted 1 year ago #

    This worked perfectly for blog post authors and their links, but I'm stumped on comment authors. I'd like anybody who's registered through symposium and my site, and who leaves a comment on any post, to have their name clickable to visit their profile in symposium (or wordpress profile as symposium should forward automatically). This should overwrite any html link they may already have attached to their author name.

    Anybody know how I would go about doing this, in a similar method to the above code for post authors?

  6. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    As per the Forum Welcome, please post your own topic. Posting in an existing topic prevents us from being able to track issues by topic. Added to which, your problem - despite any similarity in symptoms - is likely to be completely different.

Topic Closed

This topic has been closed to new replies.

About this Topic