1

I have created a simple child theme of Twenty Eleven, with a style.css, a functions.php and a footer.php

The functions.php is the following:

<?php
//This adds a custom favicon to the front site of the website
function childtheme_favicon() { ?>
    <link rel="shortcut icon" href="<?php echo 
    bloginfo('stylesheet_directory') ?>/images/favicon.ico">
<?php }
add_action('wp_head', 'childtheme_favicon');

//This is for automatically calculating the copyright years
function comicpress_copyright() {
    global $wpdb;
    $copyright_dates = $wpdb->get_results("SELECT
    YEAR(min(post_date_gmt)) AS firstdate,
    YEAR(max(post_date_gmt)) AS lastdate FROM $wpdb->posts
    WHERE post_status = 'publish' ");

    $output = '';
    if($copyright_dates) {
        $copyright = "© " . $copyright_dates[0]->firstdate;
        if($copyright_dates[0]->firstdate != $copyright_dates[0]->lastdate) {
            $copyright .= '-' . $copyright_dates[0]->lastdate;
        }
        $output = $copyright;
    }
    return $output;
}
?>

The footer.php used to have some code for copyrights, but as of now, for testing reasons it is an exact copy of the unedited parent theme.

WSOD [aka the White Screen of Death]

So here is the problem. If I remove either the footer.php or the functions.php from the child theme, the site works as expected!

But if those two coexist in the child-theme folder, I get a completely blank screen when I try to logout. If i force logging out by deleting cookies, salt or whatever, I cannot log back in the dashboard, getting a blank screen once again. Tried different browsers with the same results, and debugging mode is active but I got no error messages so far. The site is hosted on bluehost.

Any ideas, please?

Mpampirina
  • 103
  • 3
  • 17
  • Since upgrading to 3.4, I also have strange child theme issues. If I have a functions.php and just import TwentyEleven stylesheet, the search box CSS is all messed up. This happens even if my functions.php does nothing. – Jeff Yates Oct 08 '12 at 02:44
  • 1
    Well I removed all my plugins, and then re-installed them, all of them one by one. And the problem was fixed. Only God knows which one was problematic. – Mpampirina Jan 14 '13 at 13:11

1 Answers1

0

Are you just copying your functions.php and footer.php files from the parent theme? Or have you started with a fresh file. I know that more often then not just simply copying the functions.php file will give you the white screen of death.

bilcker
  • 1,120
  • 1
  • 15
  • 43