Advertisement
martcol

Widgetize Footer Wordpress

Nov 20th, 2012
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. /*This is my function.php in child theme*/
  2. <?php
  3. function the_neighbourgood_widgets_init() {
  4.  
  5. register_sidebar( array(
  6. 'name' => __( 'Footer One', 'the-bootstrap' ),
  7. 'id' => 'footer01',
  8. 'before_widget' => '<aside id="%1$s" class="widget well %2$s">',
  9. 'after_widget' => '</aside>',
  10. 'before_title' => '<h2 class="widget-title">',
  11. 'after_title' => '</h2>',
  12. ) );
  13.  
  14. register_sidebar( array(
  15. 'name' => __( 'Footer Two', 'the-bootstrap' ),
  16. 'id' => 'footer02',
  17. 'before_widget' => '<aside id="%1$s" class="widget well %2$s">',
  18. 'after_widget' => '</aside>',
  19. 'before_title' => '<h2 class="widget-title">',
  20. 'after_title' => '</h2>',
  21. ) );
  22.  
  23. register_sidebar( array(
  24. 'name' => __( 'Footer Three', 'the-bootstrap' ),
  25. 'id' => 'footer03',
  26. 'before_widget' => '<aside id="%1$s" class="widget well %2$s">',
  27. 'after_widget' => '</aside>',
  28. 'before_title' => '<h2 class="widget-title">',
  29. 'after_title' => '</h2>',
  30. ) );
  31. }
  32. add_action( 'widgets_init', 'the_neighbourgood_widgets_init' );
  33. ?>
  34.  
  35. /*This is in footer.php */
  36.  
  37. <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Footer One" , "Footer Two" , "Footer Three") ) : ?>
  38. <?php endif; ?>
  39.  
  40. <?php tha_footer_bottom(); ?>
  41. </footer><!-- #colophon -->
  42. <?php tha_footer_after(); ?>
  43. </div><!-- #page -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement