function is_user_logged_in() { $current_user = wp_get_current_user(); echo("error $current_user"); return $current_user->exists(); }