Redirect author archive page to BP profile tab with authors posts listing

  • Participant
    Level: Enlightened
    Posts: 72
    Vivek Mathur on #24965

    Hi Brajesh,

    I would like to have a BP profile tab which lists the posts authored by the currently viewed member, and redirect the authors archive page to this new tab.

    I saw this post : https://buddydev.com/redirect-wordpress-author-archive-buddypress-profile/
    which would serve the second part (except i dont know how the set the new tab url in redirect url)

    Would you have any snippet available to do this?


  • Keymaster
    (BuddyDev Team)
    Posts: 23854
    Brajesh Singh on #25035

    Hi Vivek,
    Please visit the posts screen on user profile and note down the part after username.

    For example, if it is http://example.com/members/vivek/abc/xyz
    our slug is ‘abc/xyz’

    After that, Please change this line

     $redirect_url = bp_core_get_user_domain( get_queried_object_id() );

    with that slug as

     $redirect_url = bp_core_get_user_domain( get_queried_object_id() ) .'abc/xyz';

    Hope that helps.


  • Participant
    Level: Enlightened
    Posts: 72
    Vivek Mathur on #25041

    Thanks very much for this, Brajesh.

    However, I do not have a My Posts tab in the profile. For the first part of my query, would there be any snippet to add the My Posts tab into the profile? I tried this one, and it inserted a My Posts tab, but it is blank: https://jonaskjodt.com/display-author-posts-in-buddypress-user-profile/

    Any suggestions on how to get the tab with the user’s posts listed in it?

    thanks very much,

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2756
    Ravi on #25042

    Hello Vivek,

    Try the following URL. It allows you to add a custom tab with demo content.



You must be logged in to reply to this topic.

This topic is: not resolved