Modify "IF" statement to exclude front page
-
In my header.php file I currently have the following code related to displaying my header image
<div class="clear"></div> <div class="head-img"> <div class="tagline"><?php bloginfo('description'); ?></div> <?php $t_custom_background = get_option( "nattywp_custom_header" ); if ($t_custom_background != '') { ?> <img src="<?php echo $t_custom_background; ?>" alt="Header image" border="0" /> <?php } elseif (!isset($t_main_img) || $t_main_img == 'no' || $t_main_img == 'header2.jpg' ) { ?> <img src="<?php echo get_template_directory_uri(); ?>/images/header/headers.jpg" alt="Header image" border="0" /> <?php } else { ?> <img src="<?php echo get_template_directory_uri(); ?>/images/header/<?php echo t_get_option( "t_main_img" ); ?>" alt="Header image" border="0" /> <?php } ?>
I know adding this php code elimates the image from all pages but the front page
<?php if( is_home() || is_front_page() ) : ?> YOUR CODE HERE <?php endif; ?>
However I would like to have the front page display no header image, and all other pages display the image as is.
My wordpress site can be found here: https://www.solarintsys.com
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Modify "IF" statement to exclude front page’ is closed to new replies.