Hey all,
Been trying to figure out a way to handle this, couldn't find an exact answer on the forums so I'm hoping someone can help me out.
I'm developing a child theme with a 3 column layout. Primary sidebar to the left, content, then secondary sidebar to the right. I have created a theme options panel, and one of the options I have is for the user to upload a photo of themselves, which SHOULD be added above the primary sidebar, and I wanted to also add options for adding a secondary menu below that image - outside of using a widget.
The thematic_abovemainasides action doesn't work because of the necessary CSS for the layout.
I tried str_replace with the thematic_before_widget_area action, but that could only take me so far
I guess my question would be is there a way to completely rewrite the thematic_before_widget_area function without attacking thematic's core files?
Something so I could do the following?
// this function returns the opening CSS markup for the widget area
function thematic_before_widget_area($hook) {
$content = "\n";
if ($hook == 'primary-aside') {
$content .= '<div id="primary" class="aside main-aside">' . "\n";
} elseif ($hook == 'secondary-aside') {
$content .= '<div id="secondary" class="aside main-aside">' . "\n";
} elseif ($hook == '1st-subsidiary-aside') {
$content .= '<div id="first" class="aside sub-aside">' . "\n";
} elseif ($hook == '2nd-subsidiary-aside') {
$content .= '<div id="second" class="aside sub-aside">' . "\n";
} elseif ($hook == '3rd-subsidiary-aside') {
$content .= '<div id="third" class="aside sub-aside">' . "\n";
} else {
$content .= '<div id="' . $hook . '" class="aside">' ."\n";
}
$content .= "\t" . '<ul class="xoxo">' . "\n";
return apply_filters('thematic_before_widget_area', $content);
}
And replace it with something like this?
// this function returns the opening CSS markup for the widget area
function thematic_before_widget_area($hook) {
$content = "\n";
if ($hook == 'primary-aside') {
$content .= '<div id="primary" class="aside main-aside">' . // ADD MORE FUNCTIONALITY HERE "\n";
} elseif ($hook == 'secondary-aside') {
$content .= '<div id="secondary" class="aside main-aside">' . "\n";
} elseif ($hook == '1st-subsidiary-aside') {
$content .= '<div id="first" class="aside sub-aside">' . "\n";
} elseif ($hook == '2nd-subsidiary-aside') {
$content .= '<div id="second" class="aside sub-aside">' . "\n";
} elseif ($hook == '3rd-subsidiary-aside') {
$content .= '<div id="third" class="aside sub-aside">' . "\n";
} else {
$content .= '<div id="' . $hook . '" class="aside">' ."\n";
}
$content .= "\t" . '<ul class="xoxo">' . "\n";
return apply_filters('thematic_before_widget_area', $content);
}
If someone knows of an easier/better way to accomplish what I'm after, let me know -
Thanks!