Skip to:
Content
Pages
Categories
Search
Top
Bottom

Link from WordPress Author Page to Buddypress Profile Page

Viewing 6 replies - 1 through 6 (of 6 total)
  • Profile photo of catwomanbadkitty
    catwomanbadkitty
    Participant

    @catwomanbadkitty

    Not sure why my code got cut off. Will try it again:

    <h2 class="author-title">Posts By <a href="<?php the_author_posts_link(); ?>"><?php the_author_meta('display_name', $author_id); ?></a> </h2>

    Profile photo of shanebp
    shanebp
    Moderator

    @shanebp

    read:

    https://codex.buddypress.org/developer/function-examples/bp_core_get_userlink/

    try:
    <h2 class="author-title"><?php printf( _x( 'by %s', 'Posts by...', 'buddypress' ), bp_core_get_userlink( $author_id ) ); ?></h2>

    Profile photo of catwomanbadkitty
    catwomanbadkitty
    Participant

    @catwomanbadkitty

    Thanks @shanebp
    Works perfectly!
    Linking the author page through to the profile page is in my opinion the best way to join WordPress to Buddypress because it allows viewers looking at blogs on the author page to choose to click through to the bp profile or to continue to look at more blog posts by category.
    Thanks a lot for the code. Great solution!

    Profile photo of mcpeanut
    mcpeanut
    Participant

    @mcpeanut

    @shanebp @catwomanbadkitty hey shane or catwoman or anyone else that reads this could you please tell me where i would add this code in my child theme as i really need this function too. or what file would i need to add to my child theme to do this, ty

    Profile photo of Ben Hansen (ubernaut)
    Ben Hansen (ubernaut)
    Participant

    @ubernaut

    i think the code just goes in your page template.

    Profile photo of Toubidoula
    Toubidoula
    Participant

    @toubidoula

    @mcpeanut“>
    @shanebp“>
    @imath“>

    Hello, I have the same question. Could somebody explain where to put that code ?

    Best regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Link from WordPress Author Page to Buddypress Profile Page’ is closed to new replies.