Home Forums Add-ons Gallery Field Include Gallery Field in Custom Post Type Reply To: Include Gallery Field in Custom Post Type

  • Elliot:

    I did try code from that page before posting the question. I’m a front end guy that dabbles with PHP just enough to do my WordPress sites. Your ACF has been a life saver for those like me.

    Anyway… if you can just show me how to include a gallery in a custom post type that would rock. For example, let’s just say the custom post type was only pulling in the ACF gallery (to make it easy) – below is how I’d pull in a normal ACF field in a CPT:

    	 $loop = new WP_Query( array( 'post_type' => 'cars', 'posts_per_page' => 10 ) );
    	 while ( $loop->have_posts() ) : $loop->the_post();
    		echo '<img src="';
                    echo '">';