/ Published in: PHP
Add a widgetized header to the Headway Theme 2.0.x
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/*Define Header Widget*/ register_sidebars(1, array( 'name' => 'Header Widget', 'before_widget' => '<li class="widget %2$s" id="%1$s">', 'after_widget' => '</li>', 'before_title' => '<span class="widget-title">', 'after_title' => '</span>' ) ); function header_widget() { ?> <div id="header_widget" class="sidebar"> <ul class="sidebar"> <li class="widget"><h3><?php _e('Header Widget', 'headway'); ?></h3>No widgets yet!</li><?php } ?> </ul> </div> <?php } add_action('headway_before_header_link', 'header_widget', '1');