I’m using this code here:
<?php
$post_id = 3651;
$queried_post = get_post($post_id);
$title = $queried_post->post_title;
echo $title;
echo $queried_post->post_content;
?>
post id 3651 definitely exists, but I keep getting a server error.
The code is so simple – I looked at it many times but can’t figure out what’s wrong.
Am I using outdated functions or something?
Turns out I had to include this line:
Thanks for those who helped.