how do I determine which image is the featured image in the database

this comes down to a simple one line and there is no need to get all of the children using:

$featured image_id = get_post_meta( $post_id, '_thumbnail_id', true );

Leave a Comment