title: PHP if/else get_field() with WordPress
body: <p>I'm trying to give a client some options in the WP backend to customize a carousel that is displayed on their website's homepage. I am using Advanced Custom Fields to handle getting the input from the client. I want to give them two options:</p>
  
  <p>Option #1) Allows the client to insert a string of text to be displayed ('carousel_title_text')</p>
  
  <p>Option #2) Allows the client to upload a logo to be displayed ('carousel_logo')</p>
  
  <p>I want the code to check for title text, and if there is none, display the logo instead. I haven't yet decided what will happen if both fields are empty. Anyway, here is what I've come up with:</p>
  
  <pre><code>&lt;?
  if( get_field('carousel_title_text') ) { ?&gt;
    &lt;h2 class="promo"&gt;&lt;?php the_field('carousel_title_text');?&gt;&lt;/h2&gt;
  &lt;? } elseif( get_field('carousel_logo') ) {
    the_field('carousel_logo');
  }
  ?&gt;
  </code></pre>
  
  <p>The 'carousel_title_text' displays as long as there is an input, but when it's empty and 'carousel_logo' is not, it does not properly output the logo. Can anyone tell me what I'm doing wrong or if there's a better approach?</p>
  
  <p>Thanks in advance,</p>