/ Published in: PHP
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 'thesis_hook_header' to 'thesis_hook_after_html' and your new sidebars will show up there. Style using CSS to change their layout.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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');
URL: http://www.fouroclockproject.com