How to register a new Widget area in the Funtions.php file

 <!--how to register a widget area -->
 	// Area 5, located on the home page. Empty by default.
	register_sidebar( array(
		'name' => __( 'Home Page Widget Area', 'twentyten' ),
		'id' => 'home-page-widget-area',
		'description' => __( 'The home page widget area', 'twentyten' ),
		'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
		'after_widget' => '</li>',
		'before_title' => '<h3 class="widget-title">',
		'after_title' => '</h3>',
	) );

Then in your template files use this code to call the widget area.

	<?php if ( is_active_sidebar( 'home-page-widget-area' ) ) : ?>
				<div id="home-second" class="home-widget-area">
					<ul class="xoxo">

						<?php dynamic_sidebar( 'home-page-widget-area' ); ?>
					</ul>
				</div><!-- #first .widget-area -->
<?php endif; ?>

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.