I'm currently working on my portfolio website. I have a gallery on my Work page that shows the thumbnails of all the subpages of Work. The code I'm using is:
<?php $parent = $post->ID; ?>
<?php
query_posts('posts_per_page=16&post_type=page&post_parent='.$parent);
while (have_posts()) : the_post();
?>
<div class="project-thumb">
<a href="<?php the_permalink(); ?>">
<?php $image_thumb = get_post_meta($post->ID, 'image-thumb', true); ?>
<?php the_post_thumbnail('single-blog-thumbnail'); ?>
<div class="project-title"><?php the_title(); ?></div>
</a>
</div>
<?php endwhile; ?>
This code works perfect. I want to show the last two subpage thumbnails of Work on my home page. I tried changing
<?php $parent = $post->ID; ?>
to
<?php get_the_ID('32') ?>
It shows the last two thumbnails where I want them to be, except it replaces my blog entries for the subpages.
How can I add subpage thumbnails to a non parent page?