The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WP: functions.php with includes inside not working…help!

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #36964

    I’m building a theme with some custom post types.

    Normally all of these functions would just go in the functions.php file but I decided to make each post type function in a separate .php file.

    Basically in my functions.php file I have.

    For some reason when there is two includes in the file neither work. But when there is only one inside the file it works. I tested both as just a single include and they both work fine. I’m lost…

    Anybody know what’s going on here?



    Thanks for the reply!

    Yes with either one by itself… it works, when I have both at the same time it doesn’t work.

    I’ll double check the registering and try using include_once to see if that changes anything. I’ll also turn on the debugging, didn’t know about that one!

    Thanks again. I’ll reply back with an update if none of this works


    So, I think I have found the problem by using the debugger.

    I’m getting : Fatal error: Cannot redeclare admin_init() (previously declared in /Users/davidschiffner/Sites/mamp/nvba/wp-content/themes/!NVBA-Theme/bio.php:40) in /Users/davidschiffner/Sites/mamp/nvba/wp-content/themes/!NVBA-Theme/event.php on line 42

    bio.php and event.php are my two files that I’m including in the functions.php

    I knew I did something wrong, I used admin_init in both files. Which screwed everything up.

    Thanks again for the help Rob

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.