When I was using the default post type in Wordpress, the code above was working well. But with custom post types, It is displaying nothing.
<?php
$p=$_GET['p'];
header('Content-Type: text/html; charset: UTF-8');
require( '../../../../wp-load.php' );
$my_query = new WP_Query();
$my_query->query(array( 'post__in' => array($p)));
if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post();
echo the_content();
endwhile;
endif;
?>
Your help is highly appreciated
Custom post types are not posts.
So the solution is:
Looking hours for solution, and finding it minutes after posting question on SO