Create Custom Edit Profile Menu in BuddyPress

June 23rd, 2009 Jeremy Winter BloggingBuddyPress 6 Comments

Some of the best customizations to a site are built through thinking about the users of a particular site. When users log into BuddyPress they are automatically redirected to the homepage and are often left with a “what now” feeling.

Users love to be able to customize their profile and blog easily, so it only makes sense to add easy to use navigation menus to logged in users landing pages. I created the following code to make it semi-easy to add a edit profile menu.

The menu has been tested with BP 1.0.1 and WPMU 2.7.1

We’ll look at each link individually first

Edit Profile Link

<a href="<?php echo bp_loggedin_user_domain() ?>profile/editc">Edit Profile Info</a>

Change Avatar

<a href="<?php echo bp_loggedin_user_domain() ?>profile/change-avatar">Change Avatar</a>

Change Theme

<a href="/wp-admin/themes.php">Change Themes</a>

Create a Blog

<a href="<?php echo bp_loggedin_user_domain() ?>blogs/create-a-blog">Create a Blog</a>

Create a Group

<a href="<?php echo bp_loggedin_user_domain() ?>groups/create">Create a Group</a>

Change Email or Password

<a href="<?php echo bp_loggedin_user_domain() ?>settings/general">Change E-Mail or Password</a>

Notification Settings

<a href="<?php echo bp_loggedin_user_domain() ?>settings/notifications">Notifications Settings</a>

Blog Settings

<a href="/wp-admin/options-general.php">Blog Settings</a>

Here is the full code in a unordered list that is only displayed to logged in users.

<?php if($user_ID) : ?>

<ul>

<li><a href="<?php echo bp_loggedin_user_domain() ?>profile/editc">Edit Profile Info</a></li>

<li><a href="<?php echo bp_loggedin_user_domain() ?>profile/change-avatar">Change Avatar</a></li>

<li><a href="/wp-admin/themes.php">Change Themes</a></li>

<li><a href="<?php echo bp_loggedin_user_domain() ?>blogs/create-a-blog">Create a Blog</a></li>

<li><a href="<?php echo bp_loggedin_user_domain() ?>groups/create">Create a Group</a></li>

<li><a href="<?php echo bp_loggedin_user_domain() ?>settings/general">Change E-Mail or Password</a></li>

<li><a href="<?php echo bp_loggedin_user_domain() ?>settings/notifications">Notifications Settings</a></li>

<li><a href="/wp-admin/options-general.php">Blog Settings</a></li>

</ul>

<?php else : ?>

<?php endif; ?>

Now you can wrap it in a div and style to your liking. If you would like to use it as a widget I recommend downloading the Samsarin PHP Widget, which allows you to add PHP to certain widgets.

One last css design hint, the default BuddyPress widget title is styled as class=”widgettitle”

Technorati Tags: buddypress, buddypress menu, custom buddypress menu, buddypress profile menu, buddypress code, create menu buddypress, buddypress menu code, buddypress customization, buddypress theme edit

The Fastest Laptop Video Card (June 09)
Best Gaming Laptop for the Money (July 09)

Comment with Facebook

6 Comments


  1. Hi,

    Do you have a script for adding the category menu on the top bar menu for bp?

    Thanks!

    Maricel


  2. Thank´s for this code snippets!!

  3. Youraj


    Nice post, Liked it!!


  4. Thanks for the tip about the php ‘widget’ plugin – that will definitely make life easier for a noob :)


  5. Thanks for the tips — very useful!


  6. Thanks for providing the information, do you know how to change the menu for buddypress so all items are blow a community link like a dropbox?