I'm using BuddyPress on my Wordpress website. I'm using a page-template for the homepage, and I'm doing a check in the template to display other content when a user is logged in.
But it seems like
is_user_logged_in() always returns false on the homepage, even when the user IS logged in. On other pages, the function is working properly.
Something else I've tried was accessing the global variable
$bp->loggedin_user->id also returns 0 (again, on the homepage-template only).
Anyone who can point me in the right direction? I have no idea where to go from now.
Many thanks in advance!