Rename sidebar to sidebar-1
Matches the parent theme, so widgets should be pre-placed.
This commit is contained in:
parent
6acc6b22a5
commit
91cdf824f2
2 changed files with 12 additions and 6 deletions
|
@ -2,15 +2,21 @@
|
|||
|
||||
wp_enqueue_style( 'style', get_stylesheet_uri() );
|
||||
|
||||
// override the widget styles for sidebar-1
|
||||
add_action('after_setup_theme', function () {
|
||||
remove_action( 'widgets_init', 'twentynineteen_widgets_init' );
|
||||
});
|
||||
|
||||
add_action('widgets_init', function () {
|
||||
register_sidebar(
|
||||
array(
|
||||
'name' => 'Sidebar',
|
||||
'id' => 'tw-sidebar',
|
||||
'before_title' => '<h2 class="text-4xl font-bold text-gray-800 mt-6 mb-4 tracking-tight">',
|
||||
'id' => 'sidebar-1',
|
||||
'before_title' => '<h2 class="text-5xl font-bold mt-6 mb-4 tracking-tight">',
|
||||
'after_title' => '</h2>',
|
||||
'before_widget' => '<div class="mt-10 w-1/2 px-6">',
|
||||
'before_widget' => '<div class="mt-10 w-1/2 px-6 text-2xl">',
|
||||
'after_widget' => '</div>',
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue