Login: wp-admin knows I’m logged in but generated pages don’t
-
Here’s the problem:
None of the generated pages on my site (WP 2.9.2) will recognize that users are logged in. the link made by ‘wp_loginout’ always says “Log in”. The comments form always asks for a name and email address and doesn’t say “Logged in as <username>”. Posts and comments don’t show “Edit” links to admin users.When users log in, everything seems to work fine and they are redirected to the dashboard. Admin users can edit posts and templates via the dashboard as usual and the dashboard says “Howdy, <username>” at the top. Still, the rest of the site acts like they aren’t logged in.
I put this code in the sidebar to test it out:
<?php if(is_user_logged_in()){ _e('Logged in'); } else { _e('Logged out'); _e('<a href="https://mysite.com/wordpress/wp-admin/">Admin</a>'); } ?>
No matter how many times a user logs in they always see “Logged out”. The link works and takes them right to the admin dashboard though.
Adding the “Meta” widget to the sidebar doesn’t help either. It displays “Register” and “Log in” links.
The weird part is that it was working just fine a few days ago. I didn’t edit anything but the stylesheet or make any additions or upgrades and yet it just stopped working.
What I’ve tried:
- Naturally I cleared my browser’s file and cookie cache. I’m not using a caching plugin and any CSS changes I make are immediately visible so I’m seeing what’s really there.
- I read the usual Codex docs but, while there was plenty of info about WP sites that won’t allow logins, I couldn’t find anything relevant to my problem: users can log in just fine but generated pages don’t act like they’re logged in.
- I switched themes but it didn’t help.
- I deleted my wordpress folder and uploaded a copy from another working WP site.
- I had my ISP restore a backup of my entire /www folder from a few days before the trouble began.
The only thing I didn’t try yet is exporting my site, deleting everything on the server, reuploading a fresh copy of WP, reinstalling, then importing my backup.
Any help would be appreciated. Thanks!
- The topic ‘Login: wp-admin knows I’m logged in but generated pages don’t’ is closed to new replies.