Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to shorten a profile link?

By the way, I made this hack cleaner by implementing it as a filter inside a plugin.

function my_get_user_profile_link_filter( $link , $user_id = 0 ) {
//check for rewrite
$rewrite = bb_get_option( 'mod_rewrite' );
if ( $rewrite ) {
//what kind of rewrite there is? slug use "forum_slug" column, else the column is "forum_id"
$column = ($rewrite === 'slugs')?('forum_slug'):('forum_id');
$link = str_replace('forums/profile/', 'people/', $link);
}
return $link; // Very important line!
}

This was based on code suggested in another thread:

https://bbpress.org/forums/topic/nicer-slug-url-rewrite-plugin-done

Skip to toolbar