Oh, I would love to have a header aside!
I have added the code to the bottom functions.php and header.php in my child theme but I don't see a new header-aside widget in the widgets admin area. Isn't that the intended result?
I'm going to try to put the code here (I'm no coder, so I'll just paste the whole thing if I may...):
Here is my whole functions.php -- the header-aside widget is after the logo-image function added too.
<?php
// comments left out
?>
<?php
// ---------- Adding the logo image to the header STARTS HERE
if(get_option('child_theme_logo_enabled')){
function remove_thematic_blogtitle() {
remove_action('thematic_header','thematic_blogtitle',3);
}
add_action('init','remove_thematic_blogtitle');
function remove_thematic_blogdescription() {
remove_action('thematic_header','thematic_blogdescription',5);
}
add_action('init','remove_thematic_blogdescription');
function thematic_logo_image() {
echo '<div id="logo-image"><a href="'.get_option('home').'"><img src="'.get_option('child_theme_image').'" /></a></div>';
}
add_action('thematic_header','thematic_logo_image',4);
}
// ---------- Adding the logo image to the header ENDS HERE
// ----------------- Custom header aside starts here
function add_header_aside($content) {
$content['Header Aside'] = array(
'args' => array (
'name' => 'Header Aside',
'id' => 'header-aside',
'before_widget' => thematic_before_widget(),
'after_widget' => thematic_after_widget(),
'before_title' => thematic_before_title(),
'after_title' => thematic_after_title(),
),
'action_hook' => 'thematic_header',
'function' => 'thematic_header_aside',
'priority' => 8,
);
return $content;
}
add_filter('thematic_widgetized_areas', 'add_header_aside');
// And this is our new function that displays the widgetized area
function thematic_header_aside() {
if (is_sidebar_active('header-aside')) {
echo thematic_before_widget_area('header-aside');
dynamic_sidebar('header-aside');
echo thematic_after_widget_area('header-aside');
}
} ?>
Okay, now here is a snippet from header.php code:
<?php thematic_aboveheader(); ?>
<div id="header">
<?php thematic_header() ?>
</div><!-- #header-->
<?php
// First we remove the thematic_brandingopen() .. we're going to make one addition for this one.
// And we remove thematic_access() .. will be added later unchanged with a priority of 10.
function remove_branding() {
remove_action('thematic_header','thematic_brandingopen',1);
remove_action('thematic_header','thematic_access',9);
}
add_action('init', 'remove_branding');
// We wrap #branding and #header-aside with #header-box
function childtheme_brandingopen() { ?>
<div id="header_box">
<div id="branding">
<?php }
add_action('thematic_header','childtheme_brandingopen',1);
// Now we need to close #header-box
function header_box_close() { ?>
</div>
<?php }
add_action('thematic_header', 'header_box_close', 9);
// And we add the unchanged thematic_access() with the new priority 10
add_action('thematic_header','thematic_access', 10); ?>
<?php thematic_belowheader(); ?>
<div id="main">
I hope somebody can tell me what to do to get this mouthwatering header widget working....