Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ****************IN FUNCTIONS********************
- define( 'HEADER_IMAGE', '%s/images/headers/grey.jpg' ); // The default logo located in themes folder
- define( 'HEADER_IMAGE_WIDTH', apply_filters( '', 1920 ) ); // Width of Logo
- define( 'HEADER_IMAGE_HEIGHT', apply_filters( '', 149 ) ); // Height of Logo
- define( 'HEADER_TEXTCOLOR', '333333'); //default text
- add_theme_support('custom-header');
- function header_style() {
- // This function defines the style for the theme
- // You can change these selectors to match your theme
- ?>
- <style type="text/css">
- #header{
- background: url(<?php header_image() ?>) repeat-x;
- }
- <?php if ( 'blank' == get_header_textcolor() ) { ?>
- #header h2, #header #desc {
- }
- <?php } else { ?>
- #header h2 a, #desc {
- color:#<?php header_textcolor() ?>;
- }
- <?php } ?>
- </style>
- <?php
- }
- // Following Code is for Styling the Admin Side
- if ( ! function_exists( 'admin_header_style' ) ) :
- function admin_header_style() {
- ?>
- <style type="text/css">
- #headimg {
- height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
- width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
- }
- #headimg h2{
- padding-top:40px;
- margin: 0;
- }
- #headimg h2 a{
- color:#<?php header_textcolor() ?>;
- text-decoration: none;
- border-bottom: none;
- }
- #headimg #desc{
- color:#<?php header_textcolor() ?>;
- font-size:1em;
- margin-top:-0.5em;
- }
- <?php if ( 'blank' == get_header_textcolor() ) { ?>
- #headimg h2, #headimg #desc {
- }
- #headimg h2 a, #headimg #desc {
- color:#<?php echo HEADER_TEXTCOLOR ?>;
- }
- <?php } ?>
- </style>
- *************IN HEADER***********************
- <div id="header">
- <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="Header Image" />
- </div>
- *************IN CSS************************
- #header {
- background: rgba(0, 0, 0, 0) url("http://playfulsstudio.com/wp-content/uploads/2015/05/cropped-playful-logo.jpg") repeat-x scroll 0 0;
- margin: 0 auto;
- height: 149px;
- max-width: 1920px;
- min-width: 960px;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement