function betts_foot_widgets_init() {
register_sidebar( array(
'name' => __( 'Home Page Widget', 'betts' ),
'id' => 'home_side',
'description' => __( 'An optional widget area for your site ', 'betts' ),
'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' => __( 'Header Widget', 'betts' ),
'id' => 'head_side',
'description' => __( 'An optional widget area for your site ', 'betts' ),
'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', 'betts_foot_widgets_init' );
Display widget code -
<?php
/* A sidebar in the footer? Yep. You can customize */
dynamic_sidebar('first-footer-widget-area');
?>
register_sidebar( array(
'name' => __( 'Home Page Widget', 'betts' ),
'id' => 'home_side',
'description' => __( 'An optional widget area for your site ', 'betts' ),
'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' => __( 'Header Widget', 'betts' ),
'id' => 'head_side',
'description' => __( 'An optional widget area for your site ', 'betts' ),
'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', 'betts_foot_widgets_init' );
Display widget code -
<?php
/* A sidebar in the footer? Yep. You can customize */
dynamic_sidebar('first-footer-widget-area');
?>
No comments:
Post a Comment