I’ve made a plugin and can add links to the admin -> toolbar with code like this:
$wp_admin_bar->add_menu( array( 'id' => 'myhelp', 'title' => 'Test', 'href' => 'http://agreatdream.com/', 'meta' => array('target' => 'help')));
But I don’t know how to get a link on the site’s tool bar. The code only shows a link when I’m in the dashboard. How do I add the same link but have it so everyone can see it or only users?
Do I have to use something like this in 3.3.4?
* Warning to beginners: If you add this code to your plugin it will make it impossible to see the dashboard, until you remove this line of code of course.
$wp_toolbar->add_node( array( 'id' => 'myhelp', 'title' => 'Test', 'href' => 'http://agreatdream.com/', 'meta' => array('target' => 'help')));
Warning the code above will make it impossible to see the dashboard. Don’t add it to your plugin’s PHP unless you have something like Dreamweaver to remove it and get everything back to normal.
There isn’t any info in the codex yet so I’m not sure what to do.
- The topic ‘Link in dashboard's toolbar not showing when I just look at the site.’ is closed to new replies.