BuddyDev

How to enable BuddyPress Root Profile

Are you looking for a way to enable fancy user profile url like https://example.com/user-nice-name instead of the default profile url https://example.com/members/user-nice-name offered by BuddyPress? If yes, this is your day!

By default, BuddyPress offers user profile urls which appear as sub pages of members directory. If you need a fancy url for the user profile where members directory is not part of the user profile url, You can enable Root profile in BuddyPress.

Yes, you heard that correctly! If you need fancy user profile url like twitter, facebook, instagram etc where the user profile url consists of the siteurl and username( eg. https://example.come/user-nice-name/), you can achieve that with BuddyPress by enabling root profile. BuddyPress root profile makes the user profile url appear as direct sub page of the site directly instead of the members directory.

How to enable it?

To enable BuddyPress root profile, Please add the following code in  wp-content/plugins/ bp-custom.php file.

That's it.

If you do not know what is bp-custom.php,  Please take a look at https://buddydev.com/docs/buddypress-guides/what-is-bp-custom-php/

Here is a screenshot showing BuddyPress user profile url before enabling root profile:-

 

Enable BuddyPress Root Profile

Here is a screenshot showing BuddyPress user profile url after enabling root profile:-

Enable BuddyPress Root Profile

 

Warning:-

Enabling root profiles might have side effect. If some of your page has same slug as a user's nice name, it will cause conflict. Please do remember this while enabling the root profile.

Have a happy social networking experience with BuddyPress!

2 Responses to How to enable BuddyPress Root Profile

  • I tried this, but what happens is that when Buddy press loads, you see this code. You also see the code on screen when you log out, or go to the plugins tab in the wp back end.

    and the user, nevertheless is redirected to his profile at members/username (I use "BuddyPress Login rediret to Profile" plugin)

  • I am sorry, I see you left out the php syntax, and just gave the code. It does work as

Leave a Reply

Are you looking for support?

Please ask support questions in BuddyDev Forum and help us serve you better. Please use comment for general discussion/feature suggestions.

Your email address will not be published. All the fields marked as * are required.

If you are posting code, please use <pre> { Your Code Block } </pre>. Example:- <pre> echo $name; </pre>

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">


Subscribe