How to remove the header from all pages except home?

I have a Template Monster WP theme that I need to remove the headers from all pages except home. I have read several posts on this, but my code is a bit different. Can someone please help me? The header.php file is below. Many thanks!

<div id="main"><!-- this encompasses the entire Web site -->
    <header id="header">
        <div class="container_12 clearfix">
            <div class="grid_12">
        <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 { ?>

Related posts

Leave a Reply

1 comment

  1. In the line before <header id="header">, put this code:

    <?php if( is_home() ) : ?>
    

    After the </header> tag that closes #header (which isn’t included in your code), put this code:

    <?php endif; ?>
    

    The is_home() is called a “template tag” and there are quite a few of them. If your site uses a static front page set on Settings > Reading, then replace is_home() with is_front_page().