Displaying sub page featured images on homepage
-
I have a products page, with multiple sub-pages. Each of the sub pages has a featured image.
I want to query the products page by id or name, and display the featured images for each sub-page on my homepage.
So I think it needs to be a loop of some kind, where it looks in
I have looked around quite a bit and haven’t seen much like this. Any help is greatly appreciated as I am noob to php.
This is what I currently have:
<?php query_posts('post_type=page&post_parent=6'); ?> <?php while (have_posts()) : the_post(); ?> <div class="page_thumb"> <!-- beginning thumbnail --> <div class="featured-image3"> <?php if ( has_post_thumbnail() ) {// the current post has a thumbnail } else { // the current post lacks a thumbnail } ?> <?php the_post_thumbnail(); ?> </div><!-- end thumbnail --> </div> <?php endwhile; ?>
thanks for any and all help
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Displaying sub page featured images on homepage’ is closed to new replies.