Admin Bar with custom icon (2 posts)

  1. brasofilo
    Posted 4 years ago #

    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')
  2. infocampoo
    Posted 4 years ago #

    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!!!

Topic Closed

This topic has been closed to new replies.

About this Topic