# "Get Help" Menu in the Admin Bar

> Adds a "Help" menu to the admin bar with links to your support desk, guides and contact details, so clients always know where to turn when something is unclear.

- Type: PHP
- Runs: Run everywhere
- Category: [Admin](https://wpide.com/library/category/admin/)
- Tags: branding, admin-bar, support
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/admin-bar-help-menu/

## Code

```php
// Label => URL.
$wpide_help_links = array(
    'Open a support ticket' => 'https://example.com/support',
    'Editing guide'         => 'https://example.com/guide',
    'Email us'              => 'mailto:help@example.com',
);

add_action( 'admin_bar_menu', function ( $admin_bar ) use ( $wpide_help_links ) {
    if ( ! is_user_logged_in() || ! current_user_can( 'edit_posts' ) ) {
        return;
    }

    $admin_bar->add_node( array(
        'id'     => 'wpide-help',
        'parent' => 'top-secondary',
        'title'  => '<span class="ab-icon dashicons dashicons-sos" style="margin-top:2px" aria-hidden="true"></span><span class="ab-label">Help</span>',
    ) );

    foreach ( $wpide_help_links as $label => $url ) {
        $admin_bar->add_node( array(
            'id'     => 'wpide-help-' . sanitize_title( $label ),
            'parent' => 'wpide-help',
            'title'  => esc_html( $label ),
            'href'   => esc_url( $url ),
            'meta'   => array( 'target' => 0 === strpos( $url, 'mailto:' ) ? '' : '_blank', 'rel' => 'noopener' ),
        ) );
    }
}, 5 );
```

## Notes

Edit the links in $wpide_help_links; they open in a new tab.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find ""Get Help" Menu in the Admin Bar" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
