My problem is that for some reason, a “1” appears after all the widgets. It does not matter what kind of widget I put in area or number of widgets. This does not happen when there’s no widgets at all.

In functions.php:

function header_widgets_init() {
register_sidebar( array(
    'name' => 'Header',
    'id' => 'header_area',
    'before_widget' => '',
    'after_widget'  => '',
    'before_title'  => '',
    'after_title'   => '' 
) );
}
add_action( 'widgets_init', 'header_widgets_init' );

In header.php:

<?php echo dynamic_sidebar( 'header_area' ); ?>

Read more here: dynamic_sidebar write "1" after all widgets


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , ,

Wordpress related questions and answers: