I have created custom post type with name Projects. and also created single-projects.php. the code is here
<?php
$args = array(
'post_type' => 'projects',
'posts_per_page' => '1',
'post__not_in' => array( $post->ID )
);
// the query
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) ?>
<?php while ( $query->have_posts() ) : $query->the_post() ; ?>
<!-- start project content -->
<div class="project-content">
<h2>Your Project Description</h2>
<?php the_content(); ?>
</div>
<?php endwhile; ?>
Now i want to show the content for single page. But the content is not coming from related page. The content is coming from latest project content which i create. How can i solve the problem? thanks for help.