Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //This replaces header_style function in functions.php
- function header_style() {
- if(!get_header_image() ) return;
- ?>
- <style type="text/css">
- #header-logo{
- background: url(<?php header_image(); ?>) no-repeat;
- float: left;
- height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
- width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
- margin: 0;
- overflow: hidden;
- color: transparent;
- }
- #header h1 a{display:none;}
- #tagline_text{display:none;}
- </style>
- <?php
- }
- //This goes in header-logo.php
- <?php if(!get_header_image() ) : ?>
- <div id="header-logo" onclick="location.href='<?php bloginfo('url'); ?>'" style="cursor: pointer;" >
- <img src="<?php header_image(); ?>" alt="<?php bloginfo('name'); ?>" />
- </div>
- <?php endif; ?>
- <!-- This change second line only in Header.php -->
- <div id="header">
- <?php get_template_part( 'header', 'logo' ); //Add in the Logo ?>
- <h1 id="logo_text"><a href="<?php echo home_url(); ?>"><?php echo bloginfo('name'); ?></a></h1>
- <p id="tagline_text"><?php echo get_bloginfo ( 'description' ); ?></p>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement