Is there an efficient way to get some posts with (some of) their custom fields in one go?
I have a custom post with some custom fields and would like to create an overview page where I display all posts in their respective category. I need the custom fields because there is info about how to display the posts in this overview (icon location, alt text etc.)
I don't want to just get a list of posts and then get the custom fields for every single one of them using a loop producing a ton of queries.
I know I can cache the result until a post changes but it would be nice if it wasn't necessary at all.
So is there a way to get posts with their custom fields or at least a way to get the custom fields of several posts at once or do I have to write my own query to achieve that?