|
===================================================================== |
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
ADD THE FOLLOWING TO functions.php (or custom_functions.php) |
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
===================================================================== |
|
|
|
|
|
/*=== REGISTER HEADER AND FOOTER WIDGET AREAS ===*/ |
|
function register_custom_sidebars() { |
|
// Header Sidebar |
|
if(function_exists('register_sidebar')) |
|
register_sidebar(array( |
|
'name' => 'Header Widgets', |
|
'before_widget' => '<li class="widget %2$s" id="%1$s">', |
|
'after_widget' => '</li>', |
|
'before_title' => '<span class="widget-title">', |
|
'after_title' => '</span>', |
|
'id' => 'header-1', |
|
)); |
|
// Footer Sidebar |
|
if(function_exists('register_sidebar')) |
|
register_sidebar(array( |
|
'name' => 'Footer Widgets', |
|
'before_widget' => '<li class="widget %2$s" id="%1$s">', |
|
'after_widget' => '</li>', |
|
'before_title' => '<span class="widget-title">', |
|
'after_title' => '</span>', |
|
'id' => 'footer-1', |
|
)); |
|
} |
|
add_action('init','register_custom_sidebars', 0); |
|
|
|
|
|
/*=== DEFINE HEADER WIDGET AREA ===*/ |
|
function header_widget() { ?> |
|
<div id="header-widget" class="sidebar"> |
|
<ul class="sidebar"> |
|
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('header-1') ){ ?> |
|
<li class="widget"><h3><?php _e('Header Widgets', 'headway'); ?></h3>No widgets yet!</li> |
|
<?php } ?> |
|
</ul> |
|
</div> |
|
<?php } |
|
add_action('headway_before_header_link', 'header_widget', '1'); |
|
|
|
|
|
/*=== DEFINE FOOTER WIDGET AREA ===*/ |
|
function footer_widget() { ?> |
|
<div id="footer-widget" class="sidebar"> |
|
<ul class="sidebar"> |
|
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-1') ){ ?> |
|
<li class="widget"><h3><?php _e('Footer Widgets', 'headway'); ?></h3>No widgets yet!</li> |
|
<?php } ?> |
|
</ul> |
|
</div> |
|
<?php } |
|
add_action('headway_footer_open', 'footer_widget', '1'); |
|
|
|
|
|
|
|
|
|
|
|
===================================================================== |
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
ADD THE FOLLOWING TO style.css (or custom.css) |
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
===================================================================== |
|
|
|
|
|
/*=== HEADER ===*/ |
|
|
|
body.custom div#top { |
|
width: 50%; |
|
float: left; |
|
} |
|
body.custom div#header-widget { |
|
float: right; |
|
width: 45%; |
|
position: relative; |
|
z-index: 999; |
|
} |
|
body.custom div#header-widget ul.sidebar li.widget { |
|
display: block; |
|
} |
|
|
|
|
|
/*=== FOOTER ===*/ |
|
|
|
body.custom p#footer-copyright { |
|
width: 50%; |
|
float: left; |
|
clear: none; |
|
text-align: left; |
|
} |
|
body.custom div#footer-widget { |
|
float: right; |
|
width: 45%; |
|
position: relative; |
|
z-index: 999; |
|
} |
|
body.custom div#footer-widget ul.sidebar li.widget { |
|
display: block; |
|
} |