Different header for a particular page only
-
my header logo code looks like this,
<div class="logo"> <?php if(of_get_option('logo_type') == 'text_logo'){?> <?php if( is_front_page() || is_home() || is_404() ) { ?> <h1><a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>"><?php bloginfo('name'); ?></a></h1> <?php } else { ?> <h2><a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('description'); ?>"><?php bloginfo('name'); ?></a></h2> <?php } ?> <?php } else { ?> <?php if(of_get_option('logo_url') != ''){ ?> <a href="<?php bloginfo('url'); ?>/" id="logo"><img src="<?php echo of_get_option('logo_url', "" ); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('description'); ?>"></a> <?php } else { ?> <a href="<?php bloginfo('url'); ?>/" id="logo"><img src="<?php bloginfo('template_url'); ?>/images/logo.png" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('description'); ?>"></a> <?php } ?> <?php }?> <p class="description"><?php bloginfo('description'); ?></p> </div>
i need to change the logo of a particular page with other logo. tried the code
<?php $page_id=get_the_ID(); if(is_page()) { $image='head-image-'.$page_id.'.png'; }; if(!file_exists(TEMPLATEPATH.'/images/'.$image)) { $image='logo.png'; } echo '<img src="'.get_bloginfo('template_url').'/images/'.$image.'"/>'; ?>
but the logo is not shown on categories and posts
Thanks.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Different header for a particular page only’ is closed to new replies.