[resolved] latest posts on non-wordpress page - problems with mini loop (2 posts)

  1. redbox
    Posted 8 years ago #

    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 :)

  2. Brian
    Posted 8 years ago #

    I'm also getting this error... can anyone help?

Topic Closed

This topic has been closed to new replies.

About this Topic