Support Forum
If you change just the url on the sp side, how will buddypress sort out the url??
As I said, we have a facility already in place for you to adjust the url... its a standard wp filter called sph_buddypress_profile.... just set up a standard wp filter on it and you can adjust however you like... just remember, buddypress has to understand the url...
if you dont know how to use standard wp filters, just let us know and we can walk you through it...
Visit Cruise Talk Central and Mr Papa's World
Well I am sure @mr-papa wll correct me if I am wrong or if I am missing something here but there can be many ways of determining the user name dependent upon where it is being called from. The current user is one,. The user who made a specific post is another. Then there might be the members list where it is simply the user that is selected.
Are these the sort of user name 'sources' that you mean?
YELLOW
SWORDFISH
|
Yes those are the sources I mean.
This is what I have so far
add_filter('sph_buddypress_profile', 'bp_profile_url'); function bp_profile_url() { $userid = 1; $user = new WP_User($userid); $username = bp_is_username_compatibility_mode() ? $user->user_login : $user->user_nicename; if (strstr($username, ' ')) {$username = $user->user_nicename;} else {$username = urlencode($username);} return SFSITEURL.user_trailingslashit(BP_MEMBERS_SLUG.'/'.str_replace(' ', '', $username));}
sorry, you have lost me...
back in post #1, you said it was all working and you just wanted to remove the /profile from the end... so know you have lost me as to what you are doing... to simply remove the /profile from the end as requested in first post, something like this:
add_filter('sph_buddypress_profile', 'my_sp_bp_profile_url'); function my_sp_bp_profile_url($url) { $url = str_replace('/profile/', '/', $url); return $url; }
but it appears you are trying to do way more than introduced in the first post... if so, could you elaborate further? are you trying to redo bp profile url? or just ours?
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)