Update functions.php

Fixed bug and removed hide admin pages