Custom SQL query to get List of posts with featured image url

I am working on a task where i need to retrive 100s posts under single-page/single-request with their featured images.

By using wordpress method of retriving posts and then retrive featured image individually using get_the_post_thumbnail function it takes so much time to load the page.

Can someone provide a faster solution for this like retrive posts and featured image under one single query. That should speed up the proccess.

Read more here: Custom SQL query to get List of posts with featured image url

Leave a Reply

Your email address will not be published. Required fields are marked *