If admin is logged in

Use this bit to check if user is logged in and had admin privileges. Useful for putting edit buttons on CPT displays.

Code Markup
if(current_user_can('administrator')) {
       echo "You are viewing as admin";
}