functions.php UPADTE = White Screen of Death
-
In trying to alter custom credits (which i had added successfully previously), when updating I got the dreaded “white screen of death”
I have no idea why/how this has happened as my code seems the exact same as when it was working previously .
Code below (in a child theme) -There is code at beginning to add a forth widget to footer – the relevant code follows. (I am using Customizr Theme)I would rather not put the site live until ready as it is for a charity org i am volunteering for, but if needed i can turn off maintenance for whle.
<?php /* ADD Widget to footer*/ // Adds a widget area. It gets registered automatically as part of the arra add_filter( 'tc_footer_widgets', 'my_footer_widgets'); function my_footer_widgets( $default_widgets_area ) { $default_widgets_area['footer_four'] = array( 'name' => __( 'Footer Widget Area Four' , 'customizr' ), 'description' => __( 'Just use it as you want !' , 'customizr' ) ); return $default_widgets_area; } // Style all the footer widgets so they take up the right space add_filter( 'footer_one_widget_class', 'my_footer_widget_class'); add_filter( 'footer_two_widget_class', 'my_footer_widget_class'); add_filter( 'footer_three_widget_class', 'my_footer_widget_class'); add_filter( 'footer_four_widget_class', 'my_footer_widget_class'); function my_footer_widget_class() { return 'span3'; } add_filter('tc_credits_display', 'my_custom_credits'); function my_custom_credits(){ $credits = ''; $newline_credits = ''; return ' <div class="span4 credits"> <p> · © '.esc_attr( date( 'Y' ) ).' <a href="'.esc_url( home_url() ).'" title="'.esc_attr(get_bloginfo()).'" rel="bookmark">'.esc_attr(get_bloginfo()).'</a> · '.($credits ? $credits : 'Website by <a href="mailto:leonardger@gmail.com">Gerry Leonard</a>').' ·'.($newline_credits ? '<br />· '.$newline_credits.' ·' : '').'</p> </div>'; }
-
I’ve copied your code as is into my local installation & it works. Maybe the problem is somewhere else.
Thanks yeah but strange to me that everything was working fine until i edited this functions.php file (in child theme).. then white screen of screen…. so if problem not here, then how did problem arise, where could it be?
I’ve noticed you have an open
<?php
tag which I didn’t put in my file. Could that be the problem?But surely you need an open <?php tag?
fixed…. I deleted the functions.php (after copying it) and then uploaded the functions.php
exact same file yet now it works!!
- The topic ‘functions.php UPADTE = White Screen of Death’ is closed to new replies.