Title: Admin Bar Modification
Last modified: August 20, 2016

---

# Admin Bar Modification

 *  Resolved [almb1111](https://wordpress.org/support/users/almb1111/)
 * (@almb1111)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/admin-bar-modification/)
 * I want to edit the my-account in admin-bar.php, because I hided the back-end 
   from the users, but the href in my-account is :
    ‘href’ => $profile_url,
 * I want to make it link to [http://site.com/author/USERNAME](http://site.com/author/USERNAME),
   where USERNAME is the username of the logged in user.
    So , what would the href
   become ?

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

 *  Thread Starter [almb1111](https://wordpress.org/support/users/almb1111/)
 * (@almb1111)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/admin-bar-modification/#post-2472461)
 * come on I dont think my question is that complicated, cant anyone help me ?
 *  [John](https://wordpress.org/support/users/jsing/)
 * (@jsing)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/admin-bar-modification/#post-2472530)
 * Keep in mind I have no idea what I am doing… this returns the url that you want:
 *     ```
       $current_user = wp_get_current_user();
       $current_name = $current_user->user_login;
       $url = site_url('/author/');
   
       echo $url . $current_name;
       ```
   
 * So after adding all but the last line of that to define the two partsabove the‘
   href’ I think you could then say:
 *     ```
       'href' => $url . $current_name;
       ```
   
 * or one more step (probably unnecessary)
 *     ```
       $current_user = wp_get_current_user();
       $current_name = $current_user->user_login;
       $url = site_url('/author/');
       $new_url = $url . $current_name;
   
       'href' =>$new_url;
       ```
   
 * I am sure someone else probably knows a better way but at least this should get
   you going in the right direction.
 *  Thread Starter [almb1111](https://wordpress.org/support/users/almb1111/)
 * (@almb1111)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/admin-bar-modification/#post-2472536)
 * thanks alot man, it works.
    THANK YOU

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

The topic ‘Admin Bar Modification’ is closed to new replies.

## Tags

 * [bar](https://wordpress.org/support/topic-tag/bar/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 3 replies
 * 2 participants
 * Last reply from: [almb1111](https://wordpress.org/support/users/almb1111/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/admin-bar-modification/#post-2472536)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
