You might get away with shortcodes:
add_shortcode('title', function ($atts, $content = null) {
$atts = shortcode_atts([
'id' => null,
], $atts);
$title="";
if (!empty($atts['id'])) {
$title = get_the_title($atts['id']);
}
return $title;
});
add_shortcode('content', function ($atts, $content = null) {
$atts = shortcode_atts([
'id' => null,
], $atts);
$content="";
if (!empty($atts['id'])) {
$post = get_post($atts['id']);
// Full content, disregarding "read more" tags:
$content = str_replace('<!--more-->', '', $post->post_content);
$content = apply_filters('the_content', $content);
// Alternatively, simply use this which respects "read more" tags.
#$content = apply_filters('the_content', $content);
}
return $content;
});
Drop this into functions.php of the theme you are using.
In your page you can then use [title id="42"]
and [content id="42"]
, where 42
is the ID of the post you want to display.