How to add a link in admin bar in phone mode

Hi,
I’ve used this code to add a link to the top admin bar:

function wpb_custom_toolbar_link($wp_admin_bar) {
    $args = array(
        'id' => 'userlink',
        'title' => 'Users', 
        'href' => 'https://followtheboat.com/wp-admin/users.php', 
        'meta' => array(
            'class' => 'userlink', 
            'title' => 'Users'
            )
    );
    $wp_admin_bar->add_node($args);
}
add_action('admin_bar_menu', 'wpb_custom_toolbar_link', 999);

It works when on a PC but I’d like to make it display when on my phone. Currently, my phone only shows four icon links like this:

How can I add another icon with the link to my User page?

Thanks!

Hi @demonboy,

Thanks for reaching out.

Unfortunately, it’s the limitation of Admin bar on mobile since it’s too narrow, other items must be hidden.

Thanks!

Hi @rad,

Is the layout of the top menu in mobile mode controlled by the X theme or by WP itself?

Hey @demonboy,

No, our theme doesn’t control the admin bar. If you wish to modify the admin bar, you need to consult with a 3rd party developer.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.