Title: Edit profile menu button
Last modified: August 24, 2016

---

# Edit profile menu button

 *  Resolved [Martijn](https://wordpress.org/support/users/ximie90/)
 * (@ximie90)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/)
 * Hello,
 * We seem to have a simular problem as mentioned in a resolved post, but there 
   was no solution posted (not using it).
    Once activating the edit profile the 
   button it shows up in the menu but goes to users/username/edit instead of webpage.
   com/users/martijn/edit/.
 * Also is it possible to change the text as is possible for the register button
   or is there a special translate file for this plugin?
 * Thanks,
 * Martijn
 * [https://wordpress.org/plugins/bbp-style-pack/](https://wordpress.org/plugins/bbp-style-pack/)

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171166)
 * > Once activating the edit profile the button it shows up in the menu but goes
   > to users/username/edit instead of webpage.com/users/martijn/edit/.
 * hmm it goes to then full url on my test site.
 * can you confirm that you are getting
 * ‘/users/martijn/edit/’ where you are expecting
    ‘webpage.com/users/martijn/edit/’
 * and that this is not working?
 * on your second, add this to your functions file
 *     ```
       //This function changes the text wherever it is quoted
       function bsp_change_translate_text( $translated_text ) {
       	if ( $translated_text == 'Register' ) {
       	$translated_text = 'Hello';
       	}
       	return $translated_text;
       }
       add_filter( 'gettext', 'bsp_change_translate_text', 20 );
       ```
   
 * [https://codex.bbpress.org/functions-files-and-child-themes-explained/](https://codex.bbpress.org/functions-files-and-child-themes-explained/)
 *  Thread Starter [Martijn](https://wordpress.org/support/users/ximie90/)
 * (@ximie90)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171168)
 * Yes, when clicking on or hovering over the button it goes to or shows /users/
   martijn/edit/ where I indeed would expect to go to webpage.com/users/martijn/
   edit/
 * I find it very weird since I have a couple of links on my site to other pages
   on the site that only consist of for example href /contact.
    This will go to 
   and show on hover website.com/contact
 * So even /users/martijn/edit is something I would expect to work on the front,
   but it doesn’t. after clicking on the button the browser(tested in multiple) 
   is actually trying to go to the url [http://users/martijn/edit](http://users/martijn/edit).
 * But I think there might be another problem. I just entered the your code our 
   function.php, and I noticed the register button doesn’t go anywere. In the admin
   panel I put in the complete url to the page containing the bbp register shortcode.
   I removed the code from the functions.php again to see if that caused it, but
   it was still happening. Uppon inspecting the element it showed `<a href>register
   </a>`
 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171176)
 * ok, I’ve fixed the register part and both the link and the description should
   work (I hadn’t spotted that I’d included that in the code, so you don’t need 
   the function above!)
 * on the edit part – yes I would expect a partial slug to work. Can you tell me
   what you have exactly in
 * settings>forums>Forum Root Slug>forum root and whether forum prefix is ticked?
 *  Thread Starter [Martijn](https://wordpress.org/support/users/ximie90/)
 * (@ximie90)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171181)
 * The forum root is forums, and the box is ticket.
 * Thanks for the update, the register button is working perfectly now.
 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171188)
 * thanks for that, and great that registration is now working.
 * I don’t know why the profile edit isn’t working, it may be your theme or another
   plugin that is affecting.
 * I’m reluctant to change the core code, as it works for most/all others.
 * But if you are able to edit/alter php files, then I can work to get a resolution
   for you. Let me know.
 *  Thread Starter [Martijn](https://wordpress.org/support/users/ximie90/)
 * (@ximie90)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171239)
 * That would be great, I’m able to edit the php files.
 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171252)
 * ok, so go into
 * wp-content/plugins/bbp-style-pack/includes/functions.php
 * You should find line 159 says
 *     ```
       $profilelink = '<li><a href="/' .$slug.  $user . '/edit">'.$edit_profile.'</a></li>';
       ```
   
 * Can you change this to
 *     ```
       $profilelink = '<li><a href="http://www.mysite.com/forums' .  $user . '/edit">'.$edit_profile.'</a></li>';
       ```
   
 * obviously changing the [http://www.mysite.com](http://www.mysite.com) part to
   your website and save.
 * Then see what the link looks like.
 * You may need to play with that a bit – eg you might need to omit the http, but
   if you get it working come back with what you did. If not come back with what
   you left it at, and what it comes up with.
 *  Thread Starter [Martijn](https://wordpress.org/support/users/ximie90/)
 * (@ximie90)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171254)
 * I’ve got it sort of working:
 * `$profilelink = '<li><a href="http://mysite.com' .$slug. $user . '/edit">'.$edit_profile.'
   </a></li>';`
 * Seems to have fixed the link part, the weird thing is that some get a 404 not
   found error while the other users have no trouble and get to their bbp profile
   to edit.
 * But I think this is a seperate problem, probebly bbpress related.
 * *Edit: The problem has to do with usernames that have spaces and or a dot for
   example. The username with the spaces like “user name” will got to mysite.com/
   users/user%20name/edit after some messing around I got to the profile by changing
   the url to mysite.com/users/user-name/edit
 * I don’t know if this comes as part of your plugin or from the bbpress plugin?
 * Thanks for your help.
 *  Thread Starter [Martijn](https://wordpress.org/support/users/ximie90/)
 * (@ximie90)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171257)
 * I’ve now solved this by making `$user=$current_user->user_nicename` instead of`
   $user=$current_user->user_login` on line 149 of the previous document.
 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171263)
 * Great – thanks for working that out – that’s the correct solution which I should
   have put in there, and I’ve changed it in the plugin.
 * I’ve also added the ability to change the ‘edit profile’ description
 * Thanks again for your help in improving the plugin.
 *  Thread Starter [Martijn](https://wordpress.org/support/users/ximie90/)
 * (@ximie90)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171291)
 * I’ve updated the plugin and had to change this again: `$profilelink = '<li><a
   href="http://mysite.com' .$slug. $user . '/edit">'.$edit_profile.'</a></li>';`
 * But I made a typo and it send me to [http://mysite.com/mysite.com/user&#8230](http://mysite.com/mysite.com/user&#8230);.
 * So now I changed it to
    `$profilelink = '<li><a href="' .$slug. $user . '/edit"
   >'.$edit_profile.'</a></li>';` instead of `$profilelink = '<li><a href="/' .$
   slug. $user . '/edit">'.$edit_profile.'</a></li>';`
 * To make it work.
 * Thanks for your help and plugin update.
 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171294)
 * That is interesting as that doesn’t work on my test site, which needs the ‘/’
   to make it work.
 * This could be theme or other plugin related.
 * I’ll leave the code as I have it, as that works with the default wordpress/bbpress/
   wordpress theme combination.
 * This does mean that you’ll need to keep a note of the change that you have done,
   as new versions of my plugin may overwrite it.
 *  Thread Starter [Martijn](https://wordpress.org/support/users/ximie90/)
 * (@ximie90)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171295)
 * I figured that, it’s strange it needs it. But Its not a massive change 🙂
 * Thanks for all your support.
 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171305)
 * No problem, glad to help and you improved the plugin !

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Edit profile menu button’ is closed to new replies.

 * ![](https://ps.w.org/bbp-style-pack/assets/icon-256x256.jpg?rev=2706563)
 * [bbp style pack](https://wordpress.org/plugins/bbp-style-pack/)
 * [Support Threads](https://wordpress.org/support/plugin/bbp-style-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/bbp-style-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bbp-style-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bbp-style-pack/reviews/)

 * 14 replies
 * 2 participants
 * Last reply from: [Robin W](https://wordpress.org/support/users/robin-w/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/edit-profile-menu-button/#post-6171305)
 * Status: resolved