Function which checks if a visitor is logged in or not.
<?php is_user_logged_in(); ?>
(boolean) Return true if user is logged in and false otherwise.
if(is_user_logged_in()) { echo 'User is logged in.'; }
Since 6.2.10
is_user_logged_in() is located in app/functions/auth-function.php.