I’ve an issue concerning the thumbnail-image (the_publish_thumbnail).

I’ve a establishing my wordpress where I have to give each subpage a featured image. After I upload a picture it saves in 6 different dimensions. After I then have to extract my featured thumbnail image within the size I want, I personally use this type of code: the_post_thumbnail('featured-wide') The featured-wide may be the title from the thumbnail popped size I would like, I additionally have ‘featued-small’, ‘featured-medium’ and so forth – you receive the image.

This really is all good after i e.g. work within my loop where I list all subpages for any specific parent it shows the thumbnail for every subpage but for the parent.

My issue is then that on my small frontpage I wish to display the latest subpage for 3 different parents and for your I personally use this type of code: $pages = get_pages('child_of=54&sort_column=post_date&sort_order=desc');

Then i possess a foreach loop: foreach($pages as $page) where I inside this loop extract the title and also the page excerpt. But, my the_post_thumbnail(‘featured-medium’) doesn't work. It really does display anything and after taken a var_dump from the $pages variable as pointed out before it doesn’t list it either. So my real question is, is it feasible and just how, to extract the featured image from the subpage when you are performing it generate an income do?

Or it is possible to more effective method of getting the most recent subpage of the given parent after which display the featured image?

- Mestika