i want to show 15 random thumbnails from three parent pages. there is the code:
function homepics () {
$the_query = new WP_Query ('post_type=page&post_parent=155+165+104&orderby=rand&showposts=15');
while ( $the_query->have_posts() ) : $the_query->the_post();
echo '<li>';
echo '<a href="'.get_permalink().'">';
the_post_thumbnail ('thumbnail');
echo '</a>';
echo '</li>';
endwhile;
wp_reset_query ();
}
?>
with post_parent=155+165+104 or 155,165,104 wp don't work correctly, it's taking all pages and give me some empty li (from pages not contain thumbnail).
help me plz!