title: Writing divs with PHP if/else statements
body: <p>This is coming from a wordpress site I'm working on, but isn't a WP-specific question.</p>
  
  <p>I have an if/else PHP statement that checks whether the user is looking at my site's home page or not. If they are looking at the home page, I want the code to do nothing. If they AREN'T, I want it to display the page title in a  config.</p>
  
  <p>The code I currently have is:</p>
  
  <pre><code>&lt;div class="page-header"&gt;
    &lt;h1&gt;
      &lt;?php
      if ( is_front_page()){
          echo ' ';
      }
      elseif (is_home()) {
          if (get_option('page_for_posts', true)) {
            echo get_the_title(get_option('page_for_posts', true));
          } else {
            _e('Latest Posts', 'roots');
          }
        } elseif (is_archive()) {
          $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
          if ($term) {
            echo $term-&gt;name;
          } elseif (is_post_type_archive()) {
            echo get_queried_object()-&gt;labels-&gt;name;
          } elseif (is_day()) {
            printf(__('Daily Archives: %s', 'roots'), get_the_date());
          } elseif (is_month()) {
            printf(__('Monthly Archives: %s', 'roots'), get_the_date('F Y'));
          } elseif (is_year()) {
            printf(__('Yearly Archives: %s', 'roots'), get_the_date('Y'));
          } elseif (is_author()) {
            global $post;
            $author_id = $post-&gt;post_author;
            printf(__('Author Archives: %s', 'roots'), get_the_author_meta('display_name', $author_id));
          } else {
            single_cat_title();
          }
        } elseif (is_search()) {
          printf(__('Search Results for %s', 'roots'), get_search_query());
        } elseif (is_404()) {
          _e('File Not Found', 'roots');
        } else {
          the_title();
        }
      ?&gt;
    &lt;/h1&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I know the <code>echo ' ';</code> is probably way off, but I'm an absolute php beginner! At present this creates an empty <code>&lt;div&gt;</code> and <code>&lt;h4&gt;</code> tag, but I'd rather clean it up and create nothing at all on the home page. </p>
  
  <p>How can I best modify the code above to achieve this?</p>