I'm trying to fetch specific post content by ID for a custom post type.
I've tried the following solutions and a few more. At best I seem to be retrieving the title. But none of the content.
1:
<?php
$post_id = 15002;
$queried_post = get_post($post_id);
$title = $queried_post->post_title;
echo $queried_post->post_content;
?>
2:
<?php
$my_postid = 15002;
$content_post = get_post($my_postid);
$content = $content_post->post_content;
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
?>
3:
<?php
$ID = 15002;
$args = array('p' => $ID, 'post_type' => 'ct_template');
$loop = new WP_Query($args);
?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php global $post; ?>
<?php the_content () ?>
<?php endwhile; ?>