Return to Snippet

Revision: 45346
at April 28, 2011 19:55 by psteinweber


Initial Code
/*--------------------------------------------------*/
/* register sidebars for widgetized footer */
/*--------------------------------------------------*/

if (function_exists('register_sidebar')) {
	$sidebars = array(1, 2, 3);
	foreach($sidebars as $number) {
		register_sidebar(array(
			'name' => 'Footer ' . $number,
			'id' => 'footer-' . $number,
			'before_widget' => '',
			'after_widget' => '',
			'before_title' => '<h3>',
			'after_title' => '</h3>'
		));
	}
}

/*--------------------------------------------------*/
/* set up footer widgets */
/*--------------------------------------------------*/

function widgetized_footer() {
?>
	<div id="footer_setup">
		<div class="footer_items">
  	  		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer 1') ) : ?>
    		<?php endif; ?>
		</div>
		<div class="footer_items">
    		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer 2') ) : ?>
    		<?php endif; ?>
		</div>
		<div class="footer_items_wide">
    		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer 3') ) : ?>
    		<?php endif; ?>
		</div>
	</div>
<?php
}
add_action('thesis_hook_footer','widgetized_footer');

Initial URL


Initial Description


Initial Title
Thesis: widgetized footer

Initial Tags
wordpress

Initial Language
PHP