kronoszx
3/24/2017 - 9:20 PM

Add widgets to footer

Add widgets to footer

	//after this:
	
	register_sidebar( array(
		'name'          => esc_html__( 'Sidebar', 'ocin' ),
		'id'            => 'sidebar-1',
		'description'   => '',
		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
		'after_widget'  => '</aside>',
		'before_title'  => '<h4 class="widget-title">',
		'after_title'   => '</h4>',
	) );
	
	//add this:
	
	register_sidebar(array('id' => 'subfooter_one',   'name'=>'subfooter_one'  ));
	register_sidebar(array('id' => 'subfooter_two',   'name'=>'subfooter_two'  ));
	register_sidebar(array('id' => 'subfooter_three', 'name'=>'subfooter_three'));
	register_sidebar(array('id' => 'subfooter_four',  'name'=>'subfooter_four' ));
//Add this:

<div id="subfooter" class="row">
                <div class="col-sm-12 col-md-6">
                    <?php if ( is_active_sidebar( 'subfooter_one' ) ) : ?>
                        <div class="col-sm-6">
                            <ul><?php dynamic_sidebar( 'subfooter_one' ); ?></ul>
                        </div>
                    <?php endif; ?>
                    <?php if ( is_active_sidebar( 'subfooter_two' ) ) : ?>
                        <div class="col-sm-6">
                            <ul><?php dynamic_sidebar( 'subfooter_two' ); ?></ul>
                        </div>
                    <?php endif; ?>
                </div>
                <div class="col-sm-12 col-md-6">
                    <?php if ( is_active_sidebar( 'subfooter_three' ) ) : ?>
                        <div class="col-sm-6">
                            <ul><?php dynamic_sidebar( 'subfooter_three' ); ?></ul>
                        </div>
                    <?php endif; ?>
                    <?php if ( is_active_sidebar( 'subfooter_four' ) ) : ?>
                        <div class="col-sm-6">
                            <ul><?php dynamic_sidebar( 'subfooter_four' ); ?></ul>
                        </div>
                    <?php endif; ?>
                </div>
            </div>