WordPress.org

Ready to get started?Download WordPress

Forums

Adding link to author's posts on profile page (5 posts)

  1. kwerri
    Member
    Posted 3 years ago #

    I have a simple question. I've noticed that if I have a link constructed like this:

    http://www.mysitename.com/author/myname/

    Clicking on this will take me to all the posts made by the author whose name is myname.

    I'd like to have such a link in the profile page of myname, but I don't know which file in the theme to edit, and how to edit it. I'm using Atahualpa 3.4.6.

  2. MichaelH
    Member
    Posted 3 years ago #

  3. kwerri
    Member
    Posted 3 years ago #

    Hello Michael,

    I'm a bit confused here. Should I install the PJW user meta plugin first, then do the code customisation?

  4. MichaelH
    Member
    Posted 3 years ago #

    You would need to make a plugin from the example Peter provided.

  5. kwerri
    Member
    Posted 3 years ago #

    I forgot to add that I'm using BuddyPress.

    In the end, I fixed the problem my updating the following files in my theme:

    members/members-loop.php (in the bp_the_member() loop, to get the link in the list of members);

    members/single/member-header.php (in the item-meta div);

    <span class="author-posts">
      <a href="<?php echo get_author_posts_url(bp_get_member_user_id()); ?>">Read all posts by <?php echo bp_member_name(); ?></a>
    </span>

Topic Closed

This topic has been closed to new replies.

About this Topic