Question about is_user_logged_in
-
Hello,
I have an area in my header.php file that displays the username when they are logged in by using ‘is_user_logged_in()’ The problem is SG Optimizer skips over my is_user_logged_in content when clicking through page links until I actually reload the page in the browser. I read that the plugin serves dynamic content when users are logged in, but my actual functions using is_user_logged_in() are still not appearing until a reload occurs.
I realize this is because the site is static when caching is turned on but here are some questions:
1. Is there a way to have the plugin overlook those functions? I wouldn’t be able to just exclude entire pages/urls because my function is mostly used in the site wide header.php file. The username needs to appear on every page header.
2. Can I setup an ajax call to retrieve a newly set cookie? I have done this before, but in this case the cache seems to override this too…
3. Is there a particular cookie I can reference on your system? I noticed the cookie “wpSGCacheBypass” “1” exists only when I’m logged in. Can I reference that somehow to add in username to the header?The page I need help with: [log in to see the link]
- The topic ‘Question about is_user_logged_in’ is closed to new replies.