diff --git a/footer.php b/footer.php index 038deeb..48b2822 100644 --- a/footer.php +++ b/footer.php @@ -2,7 +2,7 @@ diff --git a/functions.php b/functions.php index 68b65fe..40bd5a2 100644 --- a/functions.php +++ b/functions.php @@ -65,17 +65,36 @@ function roots_setup() { add_action('after_setup_theme', 'roots_setup'); -// create widget areas: sidebar, footer -$sidebars = array('Sidebar', 'Footer'); -foreach ($sidebars as $sidebar) { - register_sidebar(array('name'=> $sidebar, - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

' - )); +/** + * Register default roots sidebars. + * Hook into 'widgets_init' function with a lower priority in your child + * theme to remove these sidebars. + */ +function roots_register_sidebars() { + register_sidebar( + array( + 'id'=> 'roots-sidebar', + 'name' => __('Sidebar', 'roots'), + 'description' => __('Sidebar', 'roots'), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

' + )); + register_sidebar( + array( + 'id'=> 'roots-footer', + 'name' => __('Footer', 'roots'), + 'description' => __('Footer', 'roots'), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

' + )); } +add_action( 'widgets_init', 'roots_register_sidebars' ); + // return post entry meta information function roots_entry_meta() { echo ''; diff --git a/sidebar.php b/sidebar.php index bef548c..0567eeb 100644 --- a/sidebar.php +++ b/sidebar.php @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file