• Resolved j@revive

    (@jrevive)


    Hi, this is probably an easy thing but I’m having trouble getting at the posts table in a little plugin I’m writing. (first one actually)

    I want all the feilds in every row with a post_type of page. I’ve tried using a query with $myrows = $wpdb->get_results($query); but wordpress returns this error:

    Fatal error: Call to a member function get_results() on a non-object

    Doesn’t seem to be a problem with the query. It does this on every query.

    The result I want is like the get_post() function except I want to be able to loop through all the pages to get these values, not just one.

    Any help would be appreciated!

  • The topic ‘How can I get every page in the posts table?’ is closed to new replies.