I am trying to retrieve the content of a wordpress post using its ID:
$loadpost = url_to_postid($actual_link);
$newpost = get_post($loadpost);
echo '<article id="post-'.$newpost["ID"].'"><h1>'.$newpost["post_title"].'</h1>'.$newpost["post_content"];
$loadpost returns a valid ID but somehow this expression does not work. IE returns:
Fatal error: Cannot use object of type stdClass as array in /hermes/waloraweb046/b428/moo.snippetspacecom/splittemplate/wp-content/themes/split/index.php on line 24
What does this mean?
Thanks for your help guys.