[Resolved] latest posts on non-wordpress page – problems with mini loop
I’m trying to show links to the latest posts on a non-wordpress page. I’ve read the instructions at http://codex.wordpress.org/Creating_a_Static_Front_Page and this works if the page with the mini-loop is inside my wordpress directory. But if I put the file in my home directory, even with the correct path to wp-config and the wordpress index file, I get a fatal error.
Fatal error: Call to a member function on a non-object in /path/wptest.php on line 21
Line 21 is:
$news=$wpdb->get_results("SELECT <code>ID</code>,<code>post_title</code> FROM $wpdb->posts
Am I misunderstanding the ability to do this? I appreciate any advice, thanks 🙂
- The topic ‘[Resolved] latest posts on non-wordpress page – problems with mini loop’ is closed to new replies.