Created
August 20, 2018 11:59
-
-
Save wpweb101/528713d1b78c52f7eac85d79066c47d0 to your computer and use it in GitHub Desktop.
Modify Collection Author URL to BuddyPress Member Page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Change collection author url to buddypress member page. | |
| */ | |
| add_filter( 'woo_cl_get_collection_page_url', 'custom_woo_cl_get_collection_page_url', 10, 2 ); | |
| function custom_woo_cl_get_collection_page_url( $coll_page_url, $user_name ) { | |
| //Check if buddypress active | |
| if( class_exists( 'BuddyPress' ) ) { | |
| return bp_get_members_directory_permalink() . $user_name; | |
| } | |
| return $coll_page_url; | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment