Return all custom meta data for one custom post type
If all of your custom post type posts have all meta fields that you need then you can use the fields argument and set it to ids which will work much faster for example: //get your custom posts ids as an array $posts = get_posts(array( ‘post_type’ => ‘your_post_type’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1, ‘fields’ … Read more