Derp. I think I may have figured this one out, too. Sorry. Would someone be so kind as to possibly confirm if this makes sense?
The particular theme I had enabled already had a functions.php that looked like this:
<?php
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'Sidebar',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '',
'before_title' => '<h2 class="sidebartitle">',
'after_title' => '</h2>',
));
// Search
function widget_zone_out_search() {
?>
<li class="list-search">
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
<?php
}
if ( function_exists('register_sidebar_widget') )
register_sidebar_widget(__('Search'), 'widget_zone_out_search');
?>
When I added the custom header code, I tacked it right on the end, so the last part of the file looked like this:
[beginning file stuff]
...
<li class="list-search">
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
<?php
}
if ( function_exists('register_sidebar_widget') )
register_sidebar_widget(__('Search'), 'widget_zone_out_search');
?>
<?php
define('HEADER_TEXTCOLOR', '#000000');
define('HEADER_IMAGE', '%s/images/image_header.jpg'); // %s is theme dir uri
define('HEADER_IMAGE_WIDTH', 700);
define('HEADER_IMAGE_HEIGHT', 225);
function header_style() {
[rest of custom header code]
...
?>
To stop the "headers already sent" error, I got rid of the
?> <?php
between the pre-existing functions.php code and the custom header code:
...
if ( function_exists('register_sidebar_widget') )
register_sidebar_widget(__('Search'), 'widget_zone_out_search');
define('HEADER_TEXTCOLOR', '#000000');
define('HEADER_IMAGE', '%s/images/image_header.jpg'); // %s is theme dir uri
...
That seems to have done the trick. Can somebody explain WHY? It seemed like a logical thing to try, but I'd kind of like to know why it works...
Thanks!