Skip to content

Disables author archives and redirect to BuddyPress profile instead

Notifications You must be signed in to change notification settings

shay1383/buddypress-author-redirect-to-profile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

BuddyPress Author Redirect to Profile

Credit: Brajesh Singh https://buddydev.com/

Disables author archives and redirects to BuddyPress profile instead

If you are familiar with functions.php I suggest you to use the following code instead of using the plugin:

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' );

If you are not familiar with functions.php, simply go to your WordPress Dashboard >> Plugins >> Add New >> Upload and then upload, install and activate the .zip file.

About

Disables author archives and redirect to BuddyPress profile instead

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages