Advanced Custom Header
-
I am using a customizable header made by the designer of the Connections Reloaded theme. I adjusted the with and height to fit my theme. All working well. I can change the color of the header title and tagline and upload a new image.
There are some issues though… One, the header image of 1160px it is to big for the Dashboard Header Image configuration setting page. Two I would like to be able to change the padding of the title and tagline from the Dashboard Header Image admin as well. Anybody any tips how to adjust the code? Here is the code so far:// Custom Header define('HEADER_TEXTCOLOR', 'B5C09D'); define('HEADER_IMAGE', '%s/images/header-pascal.jpg'); // %s is theme dir uri define('HEADER_IMAGE_WIDTH', 1161); define('HEADER_IMAGE_HEIGHT', 350); define('HEADER_PADDING_TOP', 20); //define( 'NO_HEADER_TEXT', true ); function header_style() { ?> <style type="text/css"> #headimg{ background:#fff url(<?php header_image() ?>) no-repeat bottom; } <?php if ( 'blank' == get_header_textcolor() ) { ?> #headimg h1, #headimg #desc { display: none; } <?php } else { ?> #headimg h1 a, #desc { color:#<?php header_textcolor() ?>; } <?php } ?> </style> <?php } function crev_admin_header_style() { ?> <style type="text/css"> #headimg{ background:#fff url(<?php header_image() ?>) no-repeat bottom; height: <?php echo HEADER_IMAGE_HEIGHT; ?>px; width:<?php echo HEADER_IMAGE_WIDTH; ?>px; padding:0; } #headimg h1{ margin: 0; font-size: 1.6em; padding:10px 20px 0 0; text-align:right; } #headimg h1 a{ color:#<?php header_textcolor() ?>; text-decoration:none; } #headimg #desc{ color:#<?php header_textcolor() ?>; font-size: 1.4em; /*1.2em*/ text-align: left; margin-left: 60px; margin-top: -15px; } <?php if ( 'blank' == get_header_textcolor() ) { ?> #headimg h1, #headimg #desc { display: none; text-decoration:none; } #headimg h1 a, #headimg #desc { color:#<?php echo HEADER_TEXTCOLOR ?>; } <?php } ?> </style> <?php } add_custom_image_header('header_style', 'crev_admin_header_style'); ?>
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Advanced Custom Header’ is closed to new replies.