• I’ve created a child theme and everything is working fine.

    However, I want to break out some of the php in functions.php into another file in my child theme includes folder.

    If I add this to functions.php it throws an error:
    require( get_stylesheet_directory() . '/includes/ajax.php' );

    Warning: require() [function.require]: URL file-access is disabled in the server configuration

    If I move the php to the parent theme includes folder it works.

    require( get_template_directory() . '/includes/ajax.php' );

    I want my child php to stay with my child theme folder. What is the proper way to include my child theme php? I don’t want to change php.ini to adjust the security settings.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘What is the proper way to include required php in child theme?’ is closed to new replies.