Title: admin menu
Last modified: August 20, 2016

---

# admin menu

 *  [granskog](https://wordpress.org/support/users/granskog/)
 * (@granskog)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/admin-menu-1/)
 * Hi,
 * I have removed my admin bar in admin with css.
    And now I trie to add two menu
   button on the sidemenu.
 * the code is like this:
 *     ```
       function add_site_to_menu(){
       	$link = site_url();
           add_menu_page( __('Tillbacka till sida', 'Tillbacka till sida'), __('Tillbacka till sida', 'Tillbacka till sida'), 'edit_themes', $link, '', 95 );
       }
       add_action('admin_menu', 'add_site_to_menu');
   
       function add_logout_to_menu(){
       	$link = wp_logout_url(get_permalink());
           add_menu_page( __('Logga ut', 'Logga ut'), __('Logga ut', 'Logga ut'), 'edit_themes', $link, '', 99 );
       }
       add_action('admin_menu', 'add_logout_to_menu');
       ```
   
 * It show up but i got this message:
 * >  Forbidden
   >  You don’t have permission to access /localhost:8080 on this server.
 * I know what is wrong.
    It send me to this url: [http://localhost:8080/localhost:8080](http://localhost:8080/localhost:8080)
   It should send me to this url: [http://localhost:8080/](http://localhost:8080/)
   How can I solve this problem?
 * Many thanks/
    Granskog

Viewing 1 replies (of 1 total)

 *  Thread Starter [granskog](https://wordpress.org/support/users/granskog/)
 * (@granskog)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/admin-menu-1/#post-3081481)
 * Hi agian,
 * I have solved the problem with forbidden with this code:
 *     ```
       function new_nav_menu () {
           global $menu;
           $menu[600] = array('Profil', 'read', admin_url( 'profile.php' ), 'icon', 'menu-top menu-nav');
           $menu[700] = array('Tillbaka till sidan', 'read', site_url(), 'icon', 'menu-top menu-nav');
           $menu[800] = array('Logga ut', 'read', wp_logout_url(), 'icon', 'menu-top menu-nav');
       }
       add_action('admin_menu', 'new_nav_menu');
       ```
   
 * But now I whant them to open in a new window,
    how can I do that?
 * Many thanks/
    Granskog

Viewing 1 replies (of 1 total)

The topic ‘admin menu’ is closed to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [granskog](https://wordpress.org/support/users/granskog/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/admin-menu-1/#post-3081481)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
