0

I recently upgraded from WP 3.1 to 4.4.1. In the new setup, I am apparently seen as signed-in (as an admin) just on parts of the website (/blog/*) but not on other pages (that do not have the /blog/ prefix):

  1. I only see the admin bar on http://undocumentedmatlab.com/blog/* posts, but not on pages (e.g. http://undocumentedmatlab.com/about/todo). On those pages, I see the non-logged-in new-comment section at the bottom of the page, which proves that I am not recognized as being signed-in.
  2. I cannot see drafts of new posts - I can edit new posts but when I click the <Preview> button I get redirected to e.g. http://undocumentedmatlab.com/?p=6244 which gives a page-not-found error (because I'm apparently not logged in).

Both of these worked in my previous WP 3.1 installation of course.

I am always logged-in on my computer, I never logout. On some website pages WP recognizes that I'm logged-in, but for some unknown reason on other pages it does not.

How can I fix this so that WP knows that I'm signed-in?

Edit: I found out that by adding a call to get_currentuserinfo(); in header.php the problem appears to be solved. I still do not know why it happened, but at least this is a working solution for anyone else who happens to have this problem.

  • You might want to make an answer to your question using the above edit then mark it answered. – jgraup Jan 19 '16 at 15:30
0

I discovered that by adding a call to get_currentuserinfo(); in header.php the problem appears to be solved. I still do not know why it happened, but at least this is a working solution for anyone else who happens to have this problem.

Note: Following @jgraup's suggestion above, I'm posting this as an answer. However, I am not marking this as accepted because I still do not know the original reason for the odd behavior, and maybe someone has a better solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.