Modify wordpress get grandchildren

CLOSED
Bids
14
Avg Bid (GBP)
£27
Project Budget (GBP)
£20 - £30

Project Description:
Hi there,

I have the following script:

ID.'&sort_column=menu_order&child_of='.$posts[0]->ID);
if($child_pages) {
foreach($child_pages as $child_page) {
// loop stuff for child pages
echo '';
// get child pages of child page (grandchild pages)
$grandchild_pages = get_pages('sort_column=menu_order&child_of='.$child_page->ID);
if($grandchild_pages) {
foreach($grandchild_pages as $grandchild_page) {
// loop stuff for grandchild pages
if(has_post_thumbnail($grandchild_page->ID)) {
echo 'ID).'">'.get_the_post_thumbnail($grandchild_page->ID).'';
}

}
}
}
}
?>

This gets grandchild pages and orders them by menu order. However it orders them under parent like:

-Parent 1
-- 1
--2
--3
-Parent 2
-1
-2
-3

I need it not to split it up by parent so the order would be:
-1
-2
-3
-4
-5
-6

Skills required:
HTML, PHP, Wordpress
Hire JoshWillmot
Project posted by:
JoshWillmot United Kingdom
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


£ 30
in 1 days
Hire rajeshsonisl
£ 40
in 1 days
£ 30
in 1 days
£ 35
in 1 days
£ 30
in 1 days
£ 20
in 1 days
£ 20
in 1 days
£ 20
in 0 days
Hire tCognition
£ 50
in 3 days
£ 20
in 1 days