Display children of multiple pages
-
This may sound a very noob question but I am pulling my hair out on this now –
My pages structure is this –
Page ID 10
-Page ID 335
— Subpages
-Page ID 337
–Subpages
-Page ID 339
— SubpagesI want to display thumbnails of subpages of 335,337 & 339 on page id 10. I am using the below code –
<?php query_posts('post_type=page&depth=10&post_parent=337,335,339'); while (have_posts()) : the_post(); the_post_thumbnail(); the_title(); endwhile; wp_reset_query(); ?>
What I am getting is the child pages of only the last ID that I am using in the post_parent. The above code gives the child pages of only 339.
Here’s the page URL:
https://labs.42works.in/popcorn-icecream/work/What am I missing? Thanks in advance.
- The topic ‘Display children of multiple pages’ is closed to new replies.