I tried the code posted here:
$post_id_7 = get_post(7);
$title = $post_id_7->post_title;
However, I keep getting this error: Fatal error: Only variables can be passed by reference in /usr/local/www/www.stockmarketgarden.com/htdocs/wp-content/themes/connections/page.php on line 36
Any ideas as to why?
- The topic ‘get_post method not working’ is closed to new replies.