WordPress.org

Ready to get started?Download WordPress

Forums

Error in Green Grunge resulting Child Themes showing up blank in 3.5.1 (1 post)

  1. zzz1845
    Member
    Posted 1 year ago #

    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:
    http://wordpress.org/support/topic/theme-desire-child-theme-bug-fix
    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.

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

    Rob

Topic Closed

This topic has been closed to new replies.

About this Topic