Hi. I register new sidebar by adding code on widgets.php
// Sidebars
register_sidebar(array(
'name' => __('Primary', 'roots'),
'id' => 'sidebar-primary',
'before_widget' => '<section class="widget %1$s %2$s">',
'after_widget' => '</section>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
register_sidebar(array(
'name' => __('Secondary', 'roots'),
'id' => 'sidebar-secondary',
'before_widget' => '<section class="widget %1$s %2$s">',
'after_widget' => '</section>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
How can I include it on base.php without copying the code of the Primary Sidebar
<div class="content row">
<?php if (roots_display_sidebar()) : ?>
<aside class="sidebar <?php echo roots_sidebar_class(); ?>" role="complementary">
<?php include roots_sidebar_path(); ?>
</aside><!-- /.sidebar -->
<?php endif; ?>
<main class="main <?php echo roots_main_class(); ?>" role="main">
<?php include roots_template_path(); ?>
</main><!-- /.main -->
<?php if (roots_display_sidebar()) : ?>
<aside class="sidebar <?php echo roots_sidebar_class(); ?>" role="complementary">
<?php include roots_sidebar_path(); ?>
</aside><!-- /.sidebar -->
<?php endif; ?>
</div><!-- /.content -->
I want to change it dynamically and different on widgets
Thanks