@stecu: You shouldn’t edit any core theme files directly. You shouldn’t add/edit any files inside catch-resposnive
theme directory. As all these files will be reverted back to original when you update or upgrade the theme.
So, if you want to add extra sidebar and add it below featured content. Then you need to build child theme. You can download sample child theme from http://catchthemes.com/blog/create-child-theme-wordpress/ and then add the following code in your child theme functions.php
file
/**
* Register extra sidebars
*
* @since Catch Responsive
*/
function catchresponsive_child_widgets_init() {
//under featured content sidebar
register_sidebar( array(
'name' => __( 'Under Featured Content Sidebar', 'catch-responsive' ),
'id' => 'sidebar-under-featured-content',
'before_widget' => '<section id="%1$s" class="widget %2$s"><div class="widget-wrap">',
'after_widget' => '</div><!-- .widget-wrap --></section><!-- .widget -->',
'before_title' => '<h4 class="widget-title">',
'after_title' => '</h4>',
'description' => __( 'This is the extra sidebar under Featured Content', 'catchresponsive' ),
) );
}
add_action( 'widgets_init', 'catchresponsive_child_widgets_init' );
/**
* Add extra sidebar below Featurd Content
*/
add_action( 'catchresponsive_before_content', 'catchbox_under_featured_content_sidebar', 50 );
function catchbox_under_featured_content_sidebar() {
if ( is_active_sidebar( 'sidebar-under-featured-content' ) ) :
?>
<div id="sidebar-under-featured-content" class="widget-area">
<div class="wrapper">
<?php dynamic_sidebar( 'sidebar-under-featured-content' ); ?>
</div>
</div> <!-- #sidebar-under-featured-content -->
<?php endif;
}