get_results using wpdb
I’m trying to retrieve information on my database. I wanted to display all pages using this statement, but I’m getting a blank ARRAY global $wpdb; $result = $wpdb->get_results ( ” SELECT * FROM $wpdb->wp_posts WHERE post_type=”page” ” ); echo $result; // display data Output: ARRAY EDIT: After changing below suggestions, I’m now using this. but … Read more