/ Published in: PHP
URL: http://www.fouroclockproject.com
Adds two "sidebars" to the header. You can drag and drop widgets into them just like any other sidebar from your WP dashboard. You can change the Hook to move the "sidebars" somewhere else on the page. For example, change 'thesishookheader' to 'thesishookafter_html' and your new sidebars will show up there. Style using CSS to change their layout.
Expand |
Embed | Plain Text
if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Header Sidebar 3', 'before_widget' => '<li>', 'after_widget' => '</li>', 'before_title' => '<h3>', 'after_title' => '</h3>', )); if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Header Sidebar 4', 'before_widget' => '<li>', 'after_widget' => '</li>', 'before_title' => '<h3>', 'after_title' => '</h3>', )); function widget_header() { ?> <div class="sidebar_3"> <ul class="sidebar_list"> <li class="widget"> <div class="widget_box"> <h3><?php _e('Header Sidebar 3', 'thesis'); ?></h3> <p>This is your new sidebar. You can add widgets to it like normal using the Widgets Panel.</p> </div> </li> <?php } ?> </ul> </div> <div class="sidebar_4"> <ul class="sidebar_list"> <li class="widget"> <div class="widget_box"> <h3><?php _e('Header Sidebar 4', 'thesis'); ?></h3> <p>This is your new sidebar. You can add widgets to it like normal using the Widgets Panel.</p> </div> </li> <?php } ?> </ul> </div> <?php } add_action('thesis_hook_header', 'widget_header');
Comments
Subscribe to comments
You need to login to post a comment.

Hello,
Thanks for the Great code...
Question... Can we make it so it only applies to the Home Page?
Thank You,
Paul :)