Need help with custom post type issue

I just completed a wordpress tutorial on that instructed how to build a one page website. The method was to create regular pages for each section such as Services, Testimonials, etc. and then divide front-page.php into those sections populating each section with the content using a WP_Query like so:

$query = new WP_query( 'pagename=name_of_page');  //example 'pagename=services'
if ( $query -> have_posts() ) {
						while ( $query -> have_posts() ) {
							$query -> the_post();
							echo '<h2>' . get_the_title() . '</h2>';
							echo '<div class="entry-content">';
							echo '</div>';
						} // end while
					} // end if

I set up several of these sections and the site works very well. Now that I have completed the tutorial I would like to modify this code and be able to populate some sections with a post from a custom post type rather than a regular page. I can't find anything helpful by googling so my question is--Is it possible to replace 'pagename=name_of_page' so that I can pull content from a custom post type post instead of page?

Thanks in advance for your help!