Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Last active February 13, 2022 22:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/13fa49ec320af0f70c98b07365363e41 to your computer and use it in GitHub Desktop.
Save KaineLabs/13fa49ec320af0f70c98b07365363e41 to your computer and use it in GitHub Desktop.
Redirect Author Profile Page Url
<?php
/**
* Change Author Link to Author Profile Link .
*/
function yzc_change_author_page_to_profile_page( $link, $author_id ) {
if ( function_exists( 'youzer_is_active' ) ) {
// Get Author Posts Tab Url
$profile_url = bp_core_get_user_domain( $author_id );
// Redirect.
return $profile_url;
}
return $link;
}
add_filter( 'author_link', 'yzc_change_author_page_to_profile_page', 999, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment