[resolved] Dashboard disappears when child theme functions.php file is uploaded (2 posts)

  1. nickandrea19
    Posted 3 years ago #

    I have a simple functions.php file in my child theme, just to add two sidebars. However, when it is on the server, I cannot login to my dashboard. WordPress just takes me to a blank page. As soon as I delete the file and hit refresh, it loads just fine. The same happens on logout.

    I'm not sure what's going on. My functions.php file is very simple:

    register_sidebar( array(
    		'name' => 'Home Sidebar',
    		'id' => 'sidebar-home',
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget' => "</aside>",
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) ); 
    register_sidebar( array(
    	'name' => 'Archives Sidebar',
    	'id' => 'sidebar-archives',
    	'before_widget' => '',
    	'after_widget' => '',
    	'before_title' => '',
    	'after_title' => '',
    	) ); 

    Thanks in advance.

  2. nickandrea19
    Posted 3 years ago #

    I had to remove returns after the closing PHP tag. That fixed it.

Topic Closed

This topic has been closed to new replies.

About this Topic