Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Menu link to Profile

@robin-w

Moderator

Strangely this is quite difficult to achieve, as the url for a user profile edit is

http://mysite.com/forums/users/username/edit/

where the username is the actual username of the person logged in.

so you can’t add it as a menu item as far as I can work out.

2 solutions to this :

Solution 1 – the harder way !
One solution and the one I use is adding this as a line in the login widget, so that it appears under the “account” in your sidebar

I use the (bbpress) Login widget for the sidebar. This widget is set up in

wp-content/plugins/bbpress/includes/common/widgets.php

I added this line after line 145

line 145 reads
<?php bbp_logout_link(); ?>

and I add a new line 146 saying

<p><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>edit" >Amend Profile/Change password</a></p>
This then comes up when someone is logged in

Of course you’ll need to make a note of this change, as it is lost whenever you upgrade bbpress versions

the advantage (and why I use it ) is it then only gives this line when someone is logged in

Solution 2 – the easier way

If you’re not keen to change code, the download the enhanced text widget

https://wordpress.org/plugins/enhanced-text-widget/

Then in your sidebar add the enhanced text widget, and put this code in content, check the “don’t display header” and click save

<p><a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>edit" >Amend Profile/Change password</a></p>

Much easier to do, but displays whether someone is logged on or not.

Skip to toolbar