Are you starting a session in home.php?
You must call session_start()
at the first line of every php script in which you want to access session variables.
Try adding this in top of home.
<?php
session_start();
//Then do your work
Then even if session_start
is called again in head.php or sidebar.php , it will be ignored, as the session was already started.