title: My PHP code snipptet in Wordpress is not executing
body: <p>I have the following code used on the Thank You pages. It gets executed once the user fills out a form. It worked perfectly fine for months but suddenly it's not working.</p>
  <p>When I insert an echo statement before IF statements it prints a message, but not after the first IF statement.</p>
  <pre><code>&lt;?php
  
  // Make sure we have a post ID
  if ( isset( $_GET['post'] ) ) {
  
      // Load the resource
      $resource = get_post( (int) $_GET['post'] );
  
      // Make sure the supplied 'post' parameter returns an object
      if ( is_object( $resource ) ) {
  
          $title =  esc_html( get_the_title( $resource-&gt;ID ) );
  
          if ( $title === '' ) {
              $title = 'White Paper';
          }
  
          // Maybe display the video embed code
          $video_embed_code = get_field( 'video_embed_code', $resource-&gt;ID );
          if ( $video_embed_code ) {
  
              echo '&lt;div class=&quot;video_embed_code&quot;&gt;';
  
                  echo $video_embed_code;
  
              echo '&lt;/div&gt;';
  
          }
  
          // Maybe display the whitepaper URL
          $access_link = get_field( 'access_link', $resource-&gt;ID );
          if ( $access_link ) {
  
              echo '&lt;div class=&quot;access_link&quot;&gt;';
  
                  echo '&lt;a href=&quot;' . $access_link . '&quot; class=&quot;button button-1&quot;&gt;Download ' . $title . '&lt;/a&gt;';
  
              echo '&lt;/div&gt;';
  
          }
  
      }
  
  }
  </code></pre>