How to get the post_id from postmeta
There’s the WordPress meta API for retrieving meta values from the wp_postmeta table, but the API doesn’t provide a function for retrieving the post ID (post_id value), but you can use custom SQL as in your code. However, $wpdb->get_col() returns an array of values (upon success), so that’s why you get the “Array” when you … Read more