Support » Fixing WordPress » Twenty Eleven child gives blank screen on Login/Logout

  • Hello everyone. 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:

    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.

    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 blank screen of death 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 messages whatsoever.
    The site is hosted on bluehost.

    Any ideas, please?

Viewing 15 replies - 1 through 15 (of 18 total)
  • When you get the blank screen, did you check the error logs in your Bluehost cPanel? (in Error Logs, scroll down to the php logs).
    You also can edit the php.ini file to set “display_errors=On” if you want them to possibly show the error to anyone that visits that blank page on your site.

    Hello there.
    Hm, I’m checking it now and it’s a chaos. Newer and older error logs from different sites I have there,they are all messed together. I wonder if I can reset the log, to be sure which errors cause the problem. Thank you for your suggestion.

    The errors logs are stored in each folder that causes the error. If you delete the error_log folder it will clean those up for you.

    I deleted the error_log in the folder of the problematic site. Then renamed my functions.php.bk back to functions.php to recreate the crashing. When I tried to logout of the site, the blank screen happened as expected, though there was no new error_log created.

    Then I created an empty error_log with the proper permissions, as I thought that this might be the problem… Tested once again logging out, I got the blank screen, but still nothing in the error_log.

    So I guess this way is a dead end.. no?

    By the way, when the blank screen happens, the URL in the browser shows something like this:

    while when all goes well, the URL after logging out is:

    Can we assume anything from that?

    You can open your wp-config.php and change the:

    define(‘WP_DEBUG’, false);


    define(‘WP_DEBUG’, true);

    That will make it display the errors on the screen.

    bhpress, that is exactly what I did earlier, when I said

    …and debugging mode is active but I got no messages whatsoever



    Forum Moderator

    as of now, for testing reasons it is an exact copy of the unedited parent theme.

    You cannot copy the parent’s functions.php into the child! Empty your child’#s functions.php file.

    Read again.

    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.

    Only the footer.php is an exact copy. The functions.php is what I posted on a code block in my initial post

    That’s why i ‘m so curious to know if anybody has any idea that can help.

    The file ‘functions.php’ has just two mere functions, one for a favicon, and one to calculate the copyright years.

    And footer.php is an exact copy of the parent theme, just to make sure I haven’t created a bug myself in the code.

    But if I remove any of the two files from the child-theme folder, the site works fine. Otherwise, I get a blank screen of death on logout.

    The debugging mode is on, in wp-config.php yet I see no errors on the screen. Just the blank screen. Also the error_log file in my host (bluehost) is completely empty…

    It’s unexplainable. I think, I’m loosing my mind here! o_o



    Forum Moderator

    if I remove any of the two files from the child-theme folder, the site works fine.

    Then the issue is in your custom functions – probably comicpress_copyright().

    Good thought, but no. I suspected that one of the functions might be bugged, so I removed comicpress_copyright and tested the site again.

    Blank Screen.

    Then I put back that function and remove the favicon one. Tested again
    …and got blank screen.

    Then I removed both the functions, and I just left the opening and closing tags of the file <?php and ?> . Tested again and guess what….
    Blank screen!!!!!

    So it’s not the custom functions causing the problem. It’s something else, but what the heck is it?

    I was having this same problem, using a child theme of twentyeleven and getting a black screen for my dashboard login at wp-admin (specifically

    Then I went into FTP on BlueHost and noticed that I was missing the folder for original twentyeleven theme itself so I downloaded that new and unzipped it into my FTP. I also took a look at the error logs. Something was messed up with a plugin “W3TotalCache” so I disabled that.

    Now I’m back to the problem from earlier today where not only do I get a blank screen when trying to login, but even my plain website itself is totally crashed and I just see a list of links for some .shtml files and the title of my page on top has turned into “Index of /”

    Please please help! It would be much appreciated. I’m also looking to potentially pay someone if they can consult on my site for an hour. I’ve had so so many frustrating issues since my wordpress site worked back in July and then all of a sudden lost all of its formatting out of nowhere on day. I’ve tried to diagnose my original error and after weeks and weeks to no avail, I just uninstalled and reinstalled and now am encountering even more errors that when I first began, and you’d think I only go faster the second time around after learning how things work.. :\



    Forum Moderator

    @emidac: It is impolite to interrupt another poster’s ongoing thread with a question of your own and it causes significant problems for the forum’s volunteers. Please post your own topic.

    @mpampirina: What happens if you keep functions.php empty and also remove footer.php?

    @esmi, idk if you wrote this forum’s code of etiquette but….

    Generally if you make a new post about a problem that is already being addressed on a different thread, people direct you to the other post and ask why you felt so special as to make your own. It’s also more efficient to solve two of the SAME problems at the same time.

    I’ve noticed many times on this forum where people who experience the SAME problem indicate this on the same thread so it helps people diagnosing that problem to better understand it.



    Forum Moderator

    Are you using the same version of WordPress on the same physical server hosted by the same hosts with the same plugins, theme & configurations as the original poster?

    No? Then your problem – despite any similarity in symptoms – is likely to be completely different. So please help us to help you and post a new topic when we ask you to.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Twenty Eleven child gives blank screen on Login/Logout’ is closed to new replies.