is_user_logged_in() Always False When Viewing Events as a List
-
I have the following code in my page footer:
<p> <?php if ( is_user_logged_in() ) { echo 'Welcome, registered user!'; } else { echo 'Welcome, visitor!'; } ?> </p>
Which works as expected on all pages other than the events list page.
When the events list view as is set to List, is_user_logged_in() always returns false regardless of whether a user is logged in or not. However, if the events list view is set to Month or Day, is_user_logged_in() returns the expected value depending on the user’s logged in status.
Is this a bug or is there something I don’t understand about how the events list view is implemented?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘is_user_logged_in() Always False When Viewing Events as a List’ is closed to new replies.