-
Creative Dutchman replied to the question Multisite – Show the Toolbar for logged out users in the forum Boss. theme 8 years, 8 months ago
Hi @vapvarun , thank you for your reply.
Here is a solution for anyone else having the same dilemma as me.
Put this code in your subsite theme’s functions.php:add_filter( 'show_admin_bar', 'hide_admin_bar_from_visitor', 9999 );
function hide_admin_bar_from_visitor() {
if( ! is_user_logged_in() ){
return false;
}
return true;
}And it will hide the admin bar for visitors.
Credits goes to Ash
http://premium.wpmudev.org/forums/topic/subsite-hide-admin-bar-from-logged-out-usersCheers,
Ronald