From 262fab699e19786df1e2a44fa513fb5c021afad8 Mon Sep 17 00:00:00 2001 From: Nikolai Kristiansen Date: Sun, 6 Jul 2014 02:58:33 +0200 Subject: [PATCH] Hide adminbar, logout link --- wp-content/themes/aktiv2014/functions.php | 11 ++++++++--- wp-content/themes/aktiv2014/menu.php | 4 ++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/wp-content/themes/aktiv2014/functions.php b/wp-content/themes/aktiv2014/functions.php index 1c58b6f..703d550 100644 --- a/wp-content/themes/aktiv2014/functions.php +++ b/wp-content/themes/aktiv2014/functions.php @@ -394,13 +394,18 @@ function neuf_login_redirect( $redirect_to, $request, $user ) { //is there a user to check? global $user; if ( isset($user) ) { - // Redirect to homepage with ?loggedin to skip cache - return home_url()."?loggedin"; + // Redirect to homepage + return home_url()."?yourin"; } else { return $redirect_to; } } - add_filter( 'login_redirect', 'neuf_login_redirect', 10, 3 ); +/* No admin bar for mortals */ +function neuf_show_admin_bar($content) { + return ( current_user_can( 'administrator' ) ) ? $content : false; +} +add_filter( 'show_admin_bar' , 'neuf_show_admin_bar'); + ?> diff --git a/wp-content/themes/aktiv2014/menu.php b/wp-content/themes/aktiv2014/menu.php index be2c6fa..87b99bc 100644 --- a/wp-content/themes/aktiv2014/menu.php +++ b/wp-content/themes/aktiv2014/menu.php @@ -4,4 +4,8 @@ 'theme_location' => 'main-menu', 'container' => 'false', 'menu_class' => 'main-menu') ); ?> + + + +