Multiple Widget Areas


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



Copy this code and paste it in your HTML
  1. if (function_exists('register_sidebar')) {
  2.  
  3. register_sidebar(array(
  4. 'name' => 'Header',
  5. 'id' => 'header',
  6. 'description' => 'This is the widgetized header.',
  7. 'before_widget' => '<div id="%1$s" class="widg %2$s">',
  8. 'after_widget' => '</div>',
  9. 'before_title' => '<h3>',
  10. 'after_title' => '</h3>'
  11. ));
  12. register_sidebar(array(
  13. 'name' => 'Sidebar',
  14. 'id' => 'sidebar',
  15. 'description' => 'This is the widgetized sidebar.',
  16. 'before_widget' => '<div id="%1$s" class="widg %2$s">',
  17. 'after_widget' => '</div>',
  18. 'before_title' => '<h3>',
  19. 'after_title' => '</h3>'
  20. ));
  21. register_sidebar(array(
  22. 'name' => 'Footer',
  23. 'id' => 'footer',
  24. 'description' => 'This is the widgetized footer.',
  25. 'before_widget' => '<div id="%1$s" class="widg %2$s">',
  26. 'after_widget' => '</div>',
  27. 'before_title' => '<h3>',
  28. 'after_title' => '</h3>'
  29. ));
  30.  
  31. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.