Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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. But $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!

share|improve this question
    
Did you check if the page template is loaded succesfully? –  blake83 Jul 31 '12 at 8:41
    
It turned there is a default template file that comes with the theme and this files will override the page template file. So I was able to fix it by making changes in these theme-files. –  Voles Jul 31 '12 at 11:57
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.