is_user_logged_in

Description

Function which checks if a visitor is logged in or not.

Usage

<?php is_user_logged_in(); ?>

Return Values

(boolean) Return true if user is logged in and false otherwise.

Example

if(is_user_logged_in()) {
    echo 'User is logged in.';
}

Change Log

Since 6.2.10

Source File

is_user_logged_in() is located in app/functions/auth-function.php.