$pages = get_pages(array('parent' => 90, ‘hierarchical’ => 0, ‘sort_column’ => ‘menu_order’,));
$numgal = 0;
$numgal = 0;
foreach ($pages as $pagg) :
$p2 = get_pages(array(‘child_of’ => $pagg->ID, ‘sort_column’ => ‘menu_order’));
foreach ($p2 as $pagg2) :
if ($numgal == 0) {
$numpage = $numgal / 15;
?>
$numgal ++; //we've used the link for a next gallery ... $numpage = $numgal / 15; //start new gallery ?>
}
$args = array(
'post_type' => ‘attachment’,
‘numberposts’ => -1,
‘post_status’ => null,
‘post_parent’ => $pagg2->ID,
‘orderby’ => ‘menu_order’,
‘order’ => ‘asc’
);
$attachments = get_posts($args);
$default_attr = array(
‘title’ => “,
);
?>
$numgal ++; endforeach; endforeach; ?>