BuddyDev

Search

[Resolved] User Archive post to buddy-press profile post

Tagged: 

  • Participant
    Level: Enlightened
    Posts: 44
    bo on #13466

    I wanted to ask if there was a way to change author archive link;

    As I want them to be redirected a path in the authors user profile
    https://www.example.com/members/username/posts/

    As i had search a lot as this was the closest i saw from this site, but I am not sure how to get the right function. as below: [this redirect user profile]

    function buddydev_author_redirect_to_profile() {

    if ( is_author() && function_exists( ‘bp_core_redirect’ ) ) {

    $author_id = get_queried_object_id();
    bp_core_redirect( bp_core_get_user_domain( $author_id ) );
    }
    }
    add_action( ‘template_redirect’, ‘buddydev_author_redirect_to_profile’ );

    >== As i am looking for ways to include ” /posts “to it

    Thank you very much.

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #13468

    Hi Bo,
    It’s very simple to do that.

    I just put an updated post for the same here

    https://buddydev.com/buddypress/redirect-wordpress-author-archive-buddypress-profile/

    Hope that helps.
    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 44
    bo on #13486

    Wow,
    Thank you very much

  • Keymaster
    (BuddyDev Team)
    Posts: 24593
    Brajesh Singh on #13492

    You are welcome 🙂

The topic ‘ [Resolved] User Archive post to buddy-press profile post’ is closed to new replies.

This topic is: resolved