title: Wordpress: Condition Tags PHP
body: <p>This may be a simple one for you PHP experts out there. I need to give a certain <code>&lt;h1&gt;</code> to a post else show the page/post title.</p>
  
  <p>I have this so far, it works if it is on a single post page, but when I am on a different page it just shows 'the_title' instead of the page title. I think its basically about calling a php function inside an already open php tag, if that makes sense. Here is the code:</p>
  
  <pre><code>&lt;?php
  
  if ( is_single() ) {
      echo 'News';
  
  } else {
      echo the_title();
  }
  
   ?&gt;
  </code></pre>
  
  <p>The Wordpress tag for the page title is <code>&lt;?php the_title ?&gt;</code></p>