• Resolved traumm

    (@traumm)


    I’m working on a site whereby logged in subscribers can view certain content, using the is_user_logged_in() function.

    The homepage for instance shows different content when a user is logged in.

    Once logged in, the user will see the same ‘logged out’ version of the homepage, until they navigate to a page that is only available to logged in users.

    1. User logs in -> visits homepage, sees non-logged in version of homepage
    2. User visits a users-only page (a page not accessible to non-users at all)
    3. User then goes back to homepage, sees logged-in (correct) version of the homepage

    It’s as if the user needs to visit the users-only page in order for is_user_logged_in to be triggered across the rest of the site.

    This happens whether ‘Cache Logged-in Users’ option is switched on or off.

    I couldn’t find the same topic covered anywhere else on here so far – any help appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter traumm

    (@traumm)

    I thought I should follow up on this in case anyone finds themselves in the same quandary.

    It looks like the problem wasn’t with Litespeed Cache but with a setting within another plugin – I’d altered Heartbeat settings in Optimisation.io (to post edit screens only; disabled everywhere else)

    This seems to have fixed the issue I was having.

    Plugin Support LiteSpeed Lisa

    (@lclarke)

    Oh, good, glad you got it figured out! Thanks for sharing the solution here.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘is_user_logged_in() – strange results’ is closed to new replies.