Support » Themes and Templates » Adding link to author's posts on profile page
6 years, 5 months ago
I have a simple question. I’ve noticed that if I have a link constructed like this:
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.
Might start here: http://blog.ftwr.co.uk/archives/2009/07/19/adding-extra-user-meta-fields/
I’m a bit confused here. Should I install the PJW user meta plugin first, then do the code customisation?
You would need to make a plugin from the example Peter provided.
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);
<a href="<?php echo get_author_posts_url(bp_get_member_user_id()); ?>">Read all posts by <?php echo bp_member_name(); ?></a>