/ Published in: PHP
                    
                                        
This creates a custom HTML header in Thesis with a logo and an advert section (to be used instead of CSS image replacement).
Example CSS to use with it:
.custom #header:after {content:"."; display:block; height:0; clear:both; visibility:hidden;}
.custom #header #logo {width:320px; height:90px; float:left;}
.custom #header #header_ad {width:728px; height:90px; float:right;}
                Example CSS to use with it:
.custom #header:after {content:"."; display:block; height:0; clear:both; visibility:hidden;}
.custom #header #logo {width:320px; height:90px; float:left;}
.custom #header #header_ad {width:728px; height:90px; float:right;}
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
function custom_header() {
if (is_home()) {
echo '<h1 id="logo" class="home"><a href="' . get_bloginfo('url') . '"><img src="' . THESIS_CUSTOM_FOLDER . '/home-header.jpg" alt="' . get_bloginfo('name') . '" /></a></h1>';
echo '<div id="header_ad" class="home">HOME ADVERT CODE HERE</div>';
}
else {
echo '<p id="logo"><a href="' . get_bloginfo('url') . '"><img src="' . THESIS_CUSTOM_FOLDER . '/home-header.jpg" alt="' . get_bloginfo('name') . '" /></a></p>';
echo '<div id="header_ad">OTHER ADVERT CODE HERE</div>';
}
}
remove_action('thesis_hook_header', 'thesis_default_header');
add_action('thesis_hook_header','custom_header');
Comments
 Subscribe to comments
                    Subscribe to comments
                
                