Adding new toolbar item / path to page?
-
Trying to create a template site for my new multisite.
I want to add a new top tool bar item to my multisites which takes the logged-in user to a custom help page on their subsite.
I’ve found some code to add to functions.php which creates the new item, but the link is written as the full http path:
function wp_admin_bar_new_item() { global $wp_admin_bar; $wp_admin_bar->add_menu(array( 'id' => 'wp-admin-bar-new-item', 'title' => __('iShift Archive'), 'href' => 'https://www.instantshift.com/archive/' )); } add_action('wp_before_admin_bar_render', 'wp_admin_bar_new_item');
How can I replace “https://www.etc” with a link to the subsite help page, without having to re-write the functions.php for every subsite I add?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Adding new toolbar item / path to page?’ is closed to new replies.