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?
.htaccess, turn it off and see if the 500 error is removed (might break other functionality but at least you've localised the error), then ensure that the syntax is correct