• Hi all,

    I’m getting the White Screen of Death when I try and register a new sidebar in my child theme’s function.php.

    I’m sure I could try and copy and paste from elsewhere, but I’m trying to learn PHP so would like to understand what it is that’s causing it, would anyone be able to help? Thanks

    <?php
    add_action( 'init', 'register_my_menu' );
    function register_my_menu() {
        register_nav_menu( 'top-right', __( 'Top Right Menu' ) );
    }
    ?>
    
    <?php
    function EOU_widgets_init() {
    
    	register_sidebar( array(
    		'name'          => 'Publications sidebar',
    		'id'            => 'publications',
    		'before_widget' => '<div>',
    		'after_widget'  => '</div>',
    		'before_title'  => '<h3 class="widget-title">',
    		'after_title'   => '</h3>',
    	) );
    
    }
    add_action( 'widgets_init', 'EOU_widgets_init' );
    ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Issue with PHP custom Sidebar – White Screen of Death’ is closed to new replies.