Skip to content

Instantly share code, notes, and snippets.

@lynettechandler
Created July 25, 2013 20:24
Show Gist options
  • Save lynettechandler/6083406 to your computer and use it in GitHub Desktop.
Save lynettechandler/6083406 to your computer and use it in GitHub Desktop.
Add your own URLs to WordPress admin bar
// Add your own links to admin toolbar
function tbm935_custom_toolbar($wp_admin_bar) {
$wp_admin_bar->add_menu( array(
'parent' => 'site-name',
'id' => 'calendar', // Replace this
'title' => 'Calendar', // Replace with a name
'href' => 'http://techbasedmarketing.com/wpengine/wp-admin/edit.php?page=cal' // Replace with your own URL
));
$wp_admin_bar->add_menu( array(
'parent' => 'site-name',
'id' => 'bloglink', // Replace this
'title' => 'Blog', // Replace
'href' => home_url( '/' ).'blog/' // Replace with your own URL
));
}
add_action( 'admin_bar_menu', 'tbm935_custom_toolbar', 90 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment