Using $wpdb to query posts with meta value containing current post_id
In code you posted you do not retrieve ‘list of posts’ as you say, but retrieve a list of rows in the meta table. If you want really retrieve a list of posts rely on WP_Query using meta_query param. Something like: $id = ’10’; // unserialized value $args = array( ‘post_type’ => ‘post’, ‘post_status’ => … Read more