I'm using a Thematic childtheme for my wordpress website, and instead of putting all my functions into the functions.php file, I thought I make it more organised by creating multiple other function files (admin_functions.php, single_functions.php ...) and included these files in my childtheme's functions.php file as follows:
require_once ('my-functions/admin-functions.php');
require_once ('my-functions/single-functions.php');
This works perfectly fine.
However, I'm trying to make wordpress load only the needed files by using the conditional tags as follows:
if(is_admin())
require_once ('my-functions/admin-functions.php');
elseif(is_single())
require_once ('my-functions/single-functions.php');
and this just won't work.
I can't seem to find a reason why. I thought that maybe there are some wordpress functions that must be called first before the conditional functions (is_single and is_admin) are usable. I can't seem to get anywhere though.
Any help is most appreciated. Thanks