• brasofilo

    (@brasofilo)


    This was not easy to find, so I’m publishing for the records…

    When adding an Admin Bar menu item, the way to add an icon is:

    $wp_admin_bar->add_menu( array(
    	'id' => 'Visit',
    	'title' => __('<img src="'.get_bloginfo('wpurl').'/icon.png" style="vertical-align:middle;margin-right:5px" alt="Visit Site" title="Visit Site" />Visit Site' ),
    	'href' => get_bloginfo('wpurl')
    ));

Viewing 1 replies (of 1 total)
  • Thanks brasofilo… it works ok!
    I was searching this for 2 hours… and at last, it’s here.
    (in spanish: me has salvao el culo)
    For other people, Attention to the spaces and commas!!!

Viewing 1 replies (of 1 total)
  • The topic ‘Admin Bar with custom icon’ is closed to new replies.