I’m facing some problem when I fetch page content of particular Id. I’m using the code given below.
There is many pages in my database, I just want to show the page having id =30 and post_type=page. When I’m using the code given below it show all page content having post_type=page. But I just only the one. I think there is some syntax problem in my code.
<?php
$loop = new WP_Query( array( 'post_type' => 'page','ID'=> 30) );
while ( $loop->have_posts() ) : $loop->the_post();
the_content();
endwhile;
?>
Try this
or
Good luck