/**
COMMENTED OUT BY ME
function get_page_children($page_id, $pages) {
$page_list = array();
foreach ( (array) $pages as $page ) {
if ( $page->post_parent == $page_id ) {
$page_list[] = $page;
if ( $children = get_page_children($page->ID, $pages) )
$page_list = array_merge($page_list, $children);
}
}
return $page_list;
}
*/
/**
Added by ME
*/
function get_page_children($page_id, $pages) {
$page_list = array();
return $page_list;
}
Do more with
On some themes the site crawls, on basic themes like TWENTY TWELVE it flies.
Is there a more efficient way to do this with a SQL query and, if yes, what would you do?
I know sites this size are unusual but should not be impossible.
whatever function is recommended and make it a child theme / function / something that "takes priority" over the one built into post.php
Premium Content
You need an Expert Office subscription to comment.Start Free Trial