Custom widget areas


/ Published in: PHP
Save to your folder(s)

Place this code into functions.php


Copy this code and paste it in your HTML
  1. function the_widgets_init() {
  2. if ( !function_exists('register_sidebars') )
  3. return;
  4.  
  5. register_sidebar(array(
  6. 'name' => __('Home sidebar', "wpbakery.com"),
  7. 'before_widget' => '<div id="%1$s" class="widget %2$s">',
  8. 'after_widget' => '</div><div class="clear">&nbsp;</div>',
  9. 'before_title' => '<h2 class="widget_title">',
  10. 'after_title' => '</h2>',
  11. ));
  12.  
  13. }
  14.  
  15. add_action( 'init', 'the_widgets_init' );

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.