Skip to content

Instantly share code, notes, and snippets.

@ckschmieder
Created April 14, 2018 05:55
Show Gist options
  • Save ckschmieder/84117b9fceb913c0c15ff473d00eb262 to your computer and use it in GitHub Desktop.
Save ckschmieder/84117b9fceb913c0c15ff473d00eb262 to your computer and use it in GitHub Desktop.
CB NEW HOMES - added register sidebar for footer around line 137
/**
* Register widget area.
*
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
*/
function cbnewhomes2018_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'cbnewhomes2018' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'cbnewhomes2018' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
register_sidebar( array(
'name' => esc_html__( 'Footer Widgets', 'cbnewhomes2018' ),
'id' => 'footer-1',
'description' => esc_html__( 'Add footer widgets here.', 'cbnewhomes2018' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'cbnewhomes2018_widgets_init' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment