Support » Themes and Templates » Error in Green Grunge resulting Child Themes showing up blank in 3.5.1

  • I’ve been beating my head against the wall for 6 hours on this problem. Now that I found the solution, I will post here so the next time it occurs, I have a place to go to get the answer…

    I installed a brand new WordPress 3.5.1 web site. I installed the Green Grunge Theme version 1. I created a folder wp-content/themes/green-grunge-theme-child. I created the style.css sheet:

    Theme Name:     Green Grunge Child
    Description:    Child theme for the Green Grunge theme
    Template:       green-grunge-theme
    Version:        0.1.0
    @import url("../green-grunge-theme/style.css");

    When I activated the child theme I got a blank page. So I turned on php error reporting in .htaccess:

    # Displaying PHP errors
    php_flag display_errors on

    This gave me the error:
    Warning: require_once(/Volumes/MediaAssets/com.fbcmabank/wordpress/wp-content/themes/green-grunge-church-theme-child/extensions/event-post-type.php): failed to open stream: No such file or directory in /Volumes/MediaAssets/com.fbcmabank/wordpress/wp-content/themes/green-grunge-church-theme/functions.php on line 400 Fatal error: require_once(): Failed opening required '/Volumes/MediaAssets/com.fbcmabank/wordpress/wp-content/themes/green-grunge-church-theme-child/extensions/event-post-type.php' (include_path='.:') in /Volumes/MediaAssets/com.fbcmabank/wordpress/wp-content/themes/green-grunge-church-theme/functions.php on line 400

    This was the most helpful page during my research:
    which says change get_stylesheet_directory() to get_template_directory() in the functions.php file.

    However, Green Grunge has the variable STYLESHEETPATH instead of the function get_stylesheet_directory(). Fortunately, there is something called TEMPLATEPATH also in the Green Grunge functions.php file. Thus the solution is to change STYLESHEETPATH to TEMPLATEPATH.

    require_once(STYLESHEETPATH . '/extensions/event-post-type.php');
    require_once(TEMPLATEPATH . '/extensions/event-post-type.php');


  • The topic ‘Error in Green Grunge resulting Child Themes showing up blank in 3.5.1’ is closed to new replies.