Enter your keyword

Blog

Custom Links From WordPress Admin Toolbar

function create_dsweb_menu() {
  global $wp_admin_bar;
  $menu_id = 'wpbeginner';
  $wp_admin_bar->add_menu(array('id' => $menu_id, 'title' => '<img class="tool_logo" src="'.get_bloginfo('stylesheet_directory').'/images/logo-for-admin-toolbar.png"/>', 'href' => admin_url().'index.php'));
  $wp_admin_bar->add_menu(array('parent' => $menu_id, 'title' => __('Visit Site'), 'id' => 'dsweb-home', 'href' => site_url(), 'meta' => array('target' => '_blank'))); 
}
add_action('admin_bar_menu', 'create_dsweb_menu', 2000);

No Comments

Add your review

Your email address will not be published.

* Feilds are Required.