title: How to fix image not displaying in php?
body: <p>So I am trying to create a CTA(call to action) adding three cards into my wordpress site. I am trying to insert PHP and ACF functions so that it shows my image, currently it displays the title and the body text of these cards but doesn't show any image? How do I fix it?</p>
  
  <p>In my acf, I have created four sub field types: "cta_image", "cta_title", "intro_text" and "cta_link". In my code editor, I have inserted the following functions and so far on my wordpress site, it shows the title and the intro text but I don't know how to put an image. </p>
  
  <pre><code>&lt;?php
  
  if ( have_rows( 'ctas' ) ) :
      // Loop through rows (parent repeater).
      while ( have_rows( 'ctas' ) ) :
          the_row();
  ?&gt;
  
      &lt;div class="title-wrapper"&gt;
          &lt;?php if ( get_sub_field( 'cta_title' ) ) : ?&gt;
              &lt;h2&gt;&lt;?php the_sub_field( 'cta_title' ); ?&gt;&lt;/h2&gt;
          &lt;?php endif; ?&gt;
      &lt;/div&gt;
  
  
      &lt;div class="body-text"&gt;
          &lt;?php print_r(get_sub_field('intro_text')); ?&gt;
      &lt;/div&gt;
  
  
      &lt;?php
      endwhile;
  endif;
  ?&gt;
  </code></pre>
  
  <p>Every time I insert functions to show the image, it gives a database error or simply doesn't show any image. The final work is supposed to look like the image down below. Mine shows just the title and body text all in a single line. </p>