if a condition is true I want to display another post selected by its id on single.php.
I have this, that gives me the current id. But how can I load the content (title and acf-fields) of another post. I tried "the_content" but it did not work.
function change_post() {
$post = get_post();
echo $post->ID;
//lets say we have id 1
if($conditon){
echo "load post 2"
}
}
add_filter( 'wp', 'change_post' );