它正在显示widgets.php
:

未显示自定义程序:

sidebar.php
function footer_sidebar()
{
register_sidebar(
array(
\'name\' => __( \'Footer Sidebar 1\', \'footer1\' ),
\'id\' => \'footer1\',
\'description\' => __( \'Footer Sidebar 1\', \'footer1\' ),
\'before_widget\' => \'<div id="footer1" class="col-md-4" style="margin-bottom:10px;margin-top:-25px;">\',
\'after_widget\' => \'</div>\',
\'before_title\' => \'<h3>\',
\'after_title\' => \'</h3>\',
)
);
register_sidebar(
array(
\'name\' => __( \'Footer Sidebar 2\', \'footer2\' ),
\'id\' => \'footer2\',
\'description\' => __( \'Footer Sidebar 2\', \'footer2\' ),
\'before_widget\' => \'<div id="footer2" class="col-md-4" style="margin-bottom:10px;margin-top:-25px;">\',
\'after_widget\' => \'</div>\',
\'before_title\' => \'<h3>\',
\'after_title\' => \'</h3>\',
)
);
}
add_action( \'widgets_init\', \'footer_sidebar\' );
footer.php
<div class="row">
<?php if ( !function_exists(\'dynamic_sidebar\') || !dynamic_sidebar(\'footer1\') ) : ?><?php endif; ?>
<?php if ( !function_exists(\'dynamic_sidebar\') || !dynamic_sidebar(\'footer2\') ) : ?><?php endif; ?>
<?php if ( !function_exists(\'dynamic_sidebar\') || !dynamic_sidebar(\'footer3\') ) : ?><?php endif; ?>
<?php if ( !function_exists(\'dynamic_sidebar\') || !dynamic_sidebar(\'footer4\') ) : ?><?php endif; ?>
</div>