Calling in a specific page

Wow…quite today. Hope everyone is out enjoying the nice weather…& of course hope where ever you all are…you have nice weather.
Now for wp. I am trying to call in a page. show the page.

get_template_part( 'featured-content' );

I tried


<?php
			if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
				// Include the featured content template.
				get_template_part( '[COLOR="#FF0000"]contact-us[/COLOR]' );
			}
		?>
			<div id="primary" class="content-area">
				<div id="content" class="site-content" role="main">

					<?php
						// Start the Loop.
						while ( have_posts() ) : the_post();

							// Include the page content template.
							get_template_part( 'content', 'page' );

							// If comments are open or we have at least one comment, load up the comment template.
							//if ( comments_open() || get_comments_number() ) {
								//comments_template();
							//}
						endwhile;
					?>

&

while ( have_posts() ) : the_post([COLOR="#FF0000"][COLOR="#FF0000"]'contact-us'[/COLOR][/COLOR]);

so far nothing is working. Does anyone know the right way to bring in that page?
thank you
D

Hi pdxSherpa,

Is contact-us a custom page template or part of a template that can be included by calling it from the index file? If it’s a custom page template create a php file and add this comment at the very top:


<?php
/*
Template Name: Contact Us Page
*/ 

Save it as contact-us.php and apply it when you create/edit your page in the Pages admin panel by selecting it from the Template dropdown.

On the other hand, if you want to include a portion of content by calling it from the index.php document, you could create a content-contact.php file and call it inside the loop using


<?php while ( have_posts() ) : the_post(); ?>

   <?php	get_template_part('content' 'contact' ); ?>

<?php endwhile; ?>  

I hope this helps :slight_smile:

Thank Antonella, i’ll give it shot…i think i had tried that but not sure now!
am going to try and use plug in for a form and then called that specific page in
thx
d

Hi D., keep me posted, I hope it works.