WordPress.org

Ready to get started?Download WordPress

Forums

Link in dashboard's toolbar not showing when I just look at the site. (1 post)

  1. Glen Charles Rowell
    Member
    Posted 2 years ago #

    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.
    http://codex.wordpress.org/Class_Reference/WP_Tool_Bar

    2012-04-29th

    Glen Rowell

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by Glen Charles Rowell
  • This topic is not resolved
  • WordPress version: 3.3.2