How To Make Wp Dynamic Sidebar Like twentytwelve Theme

im new in wordpress and trying to create wordpess theme which can be used in any wordpress blog
,im following twentytwelve Theme as my theme example but when i try to create sidebar it does not work like twentytweleve, it display nothing in sidebar area, here a sidebar code which i pasted from twentytweleve

sidebar.php

functions.php

function twentytwelve_widgets_init() {
register_sidebar( array(
'name' => __( 'Main Sidebar', 'twentytwelve' ),
'id' => 'sidebar-1',
'description' => __( 'Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '',
) );

register_sidebar( array(
    'name' => __( 'First Front Page Widget Area', 'twentytwelve' ),
    'id' => 'sidebar-2',
    'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ),
    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    'after_widget' => '</aside>',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
) );

register_sidebar( array(
    'name' => __( 'Second Front Page Widget Area', 'twentytwelve' ),
    'id' => 'sidebar-3',
    'description' => __( 'Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve' ),
    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    'after_widget' => '</aside>',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
) );

}
add_action( ‘widgets_init’, ‘twentytwelve_widgets_init’ );

but the sidebar display nothing
how to make dynamic sidebar in our template markup like twentytwelve ?

Read more here: How To Make Wp Dynamic Sidebar Like twentytwelve Theme

Leave a Reply

Your email address will not be published. Required fields are marked *