Hi Guys,
I have this code from WordPress which allows the upload of a header in the backend of wordpress. However, if one user uploads it updates everyones headers.
How can i make it different for every profile?
//make changeable header
define('HEADER_TEXTCOLOR', '');
define('HEADER_IMAGE', '/setta.jpg'); // %s is theme dir uri
define('HEADER_IMAGE_WIDTH', 780);
define('HEADER_IMAGE_HEIGHT', 373);
define( 'NO_HEADER_TEXT', true );
function default_admin_header_style() {
?>
<style type="text/css">
#headimg {
}
#headimg h1, #headimg #desc {
display: none;
}
</style>
<?php
}
function header_style() {
?>
<style type="text/css">
#header{
background: url(<?php header_image() ?>) no-repeat;
height: 349px;
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
margin: auto;
margin-top: 40px;
}
#headimg {
height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
}
</style>
<?php
}
add_custom_image_header('header_style', 'default_admin_header_style');