Posted By

mommygeekology on 12/03/11


Tagged

headwaytheme


Versions (?)

Headway Widgetized Header


 / Published in: PHP
 

Add a widgetized header to the Headway Theme 2.0.x

  1. /*Define Header Widget*/
  2. register_sidebars(1,
  3. array(
  4. 'name' => 'Header Widget',
  5. 'before_widget' => '<li class="widget %2$s" id="%1$s">',
  6. 'after_widget' => '</li>',
  7. 'before_title' => '<span class="widget-title">',
  8. 'after_title' => '</span>'
  9. )
  10. );
  11. function header_widget() { ?>
  12. <div id="header_widget" class="sidebar">
  13. <ul class="sidebar">
  14. <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Header Widget') ){ ?>
  15. <li class="widget"><h3><?php _e('Header Widget', 'headway'); ?></h3>No widgets yet!</li><?php } ?>
  16. </ul>
  17. </div>
  18. <?php }
  19. add_action('headway_before_header_link', 'header_widget', '1');

Report this snippet  

You need to login to post a comment.