<?php if ( is_home() || is_front_page() ) { ?> <?php } else { ?> <div class="inner-banner" style="background:url( <?php if (has_post_thumbnail()) { ?> <?php echo get_the_post_thumbnail_url($post->ID, 'full') ?> <?php } else { ?> <?php bloginfo('stylesheet_directory'); ?>/images/default.jpg<?php } ?>) no-repeat center center / cover;"> <h2><?php the_title(); ?></h2> </div> <?php }?>