• I have buddypress and starbox-the authox box for humans plugins installed. When I click the author link on the starbox author box, it goes to the author archive. But I want to take visitors to authors’ buddypress profiles.

    So I want to redirect every request from (let’s say)
    https://www.mysite.com/author/username
    to
    https://www.mysite.com/members/username

    Is it doable? How? Or is there any way I could take visitors to authors’ buddypress profile rather than taking to their author archives?

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Yanur Islam Piash

    (@yipiash)

    Okay I did this way and it worked. Thanks to Buddydev

    Redirect Author Archive Page to BuddyPress 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' );

    ou can put it in your theme’s functions.php or in wp-content/plugins/bp-custom.php

    I am also facing this kind of issues, so we added above you given code in function.php file but when i click the post author cann’t redirect to buddy press profile page, so plz help me..

    Website : https://celebrateon.seoxpertise.org/blog (collection of list page)
    Post : https://celebrateon.seoxpertise.org/blog-redirect/

    Advance thanks….

    Thread Starter Yanur Islam Piash

    (@yipiash)

    Hi,

    Not a coder myself, found the snippet in the website and worked for me fortunately.

    Maybe you can try-

    1. Putting the code into this file: wp-content/plugins/bp-custom.php
    2. clearing browser cache and any caching plugin you are using.
    3. making sure you enabled buddypress profile from the buddypress settings menu.

    Thanks for your reply
    We tried all the above step but not working for me..

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Redirect from author archive to buddypress profile’ is closed to new replies.