This is working on one blog,but not on other,what could be the problem? How to find what is a problem?

Tnx in advance

  • How is it not working? What happens? And did you try to use the init hook to start your session?
    – Bainternet
    Mar 18, 2011 at 18:52
  • @Bainternet How do you mean how is ti not working? :) I done everything like in link that I paste in my question,and it is working on one project but not on second.How to make it work on both projects?How to find what is the problem?
    – user1147
    Mar 18, 2011 at 19:58
  • Ok then a different question, is it the same host?
    – Bainternet
    Mar 18, 2011 at 21:32
  • @Bainternet, nope it is not same host.
    – user1147
    Mar 18, 2011 at 21:35
  • Ok , this is progress, check if session mod is enabled at your server
    – Bainternet
    Mar 18, 2011 at 21:57

1 Answer 1


It's probably better to add your session_start(); to the top of your header.php file if you're planning to use it in your theme.

If you are wanting to use a session in the admin, I'd recommend either passing variables through $_GET or $_POST. Also, if you need long term storage of variables, it's pretty easy to store things in the options table. See the Settings API

  • Hi,tnx for response,will try to add to header to see is it working that way.
    – user1147
    Mar 18, 2011 at 17:20
  • nope,now it doesnt work on either of my two blogs.
    – user1147
    Mar 18, 2011 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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