title: Get custom post type by ID in Wordpress
body: <p>I'm basically looking at somehow creating a loop so I can show the content of a single custom post type based on it's ID.</p>
  
  <p>So, I want to get the content from the custom post type with an ID of 3788.</p>
  
  <p>There is a function in there to get the featured image URL too.</p>
  
  <p>For example, here's my code at the moment:</p>
  
  <pre><code>&lt;?php $args = array( 'post_type' =&gt; 'about', 'posts_per_page' =&gt; 1 ); ?&gt;
  
  &lt;?php $loop = new WP_Query( $args ); ?&gt;
  &lt;?php while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;
  
  &lt;?php global $post; ?&gt;
  &lt;?php
  $src = wp_get_attachment_image_src( get_post_thumbnail_id($post-&gt;ID), array( 5600,1000 ), false, '' ); ?&gt;  
  &lt;div class="section" style="background: url(&lt;?php echo $src[0]; ?&gt;) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; z-index:-1;"&gt;
  
  &lt;?php the_content () ?&gt;
  
  &lt;?php endwhile; ?&gt;
  </code></pre>