Hi,
WordPress MU is the Custom header API. This service allows you to quickly add some code to a theme’s fuinctions.php file to make the header area completely customizable. User will be able to upload a header image of their choice on their chosen theme without affecting other blogs using the same theme.
First, check and see if your theme has a functions.php file included. If it does not then make a blank file called functions.php. If it already has code in it which it will if the theme is widget enabled then you can paste this code in right before the last ?> tag.
//make changeable header
define(‘HEADER_TEXTCOLOR’, ”);
define(‘HEADER_IMAGE’, ‘setta.jpg’); // %s is theme dir uri and image filename
define(‘HEADER_IMAGE_WIDTH’, 985); // make sure these values match the theme header
define(‘HEADER_IMAGE_HEIGHT’, 200);
define( ‘NO_HEADER_TEXT’, true );
function yourthemename_admin_header_style() { // change yourthemename to your theme name
?>
// this part adds the header in the admin area
#headimg {
height: px;
width: px;
}
#headimg h1, #headimg #desc {
display: none;}
}
function header_style() {
?>
#header{
background: url() no-repeat;}
}
add_custom_image_header(’header_style’, ‘yourthemename_admin_header_style’); // change yourthemename to your theme name you used above.
That’s it!
Everything else is handled internally by WordPress.
Sample Functions.php File Code
Thanks,
Shane G.
Popularity: 4%














