Custom logo per page (what’s wrong?)
-
Hi, so I want to have a different logo on different pages.
This is the code in themes header.php:
<div class="header"> <?php //Display Logo Background if option is checked if ( bwthemes_option( 'logobg_checkbox' ) ) { echo '<div class="logowrapper">'; } else { echo '<div class="nologowrapper">'; } ?> <!--Website logo--> <a id="custom_logo" href="<?php echo home_url(); ?>"><img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="<?php echo bloginfo('description'); ?>" /></a> </div> </div><!-- header -->
And this is how I imagined it to work (but it doesn’t):
<!--Website logo--> <?php //dipslay member logo on member pages if ( is_page( array( 1816 ) ) ) { <a id="custom_logo" href="<?php echo home_url(); ?>"><img src="https://website.com/img/green-logo-member.png" height="<?php echo get_custom_header()->height; ?>" width="380" alt="<?php echo bloginfo('description'); ?>" /></a> } else { <a id="custom_logo" href="<?php echo home_url(); ?>"><img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="<?php echo bloginfo('description'); ?>" /></a> } ?>
What am I doing wrong?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom logo per page (what’s wrong?)’ is closed to new replies.