/ Published in: PHP

Works!
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
add_filter('wp_list_pages_excludes', 'remove_others_children'); $all_pages = get_pages(); foreach ( $all_children as $child ) $excludes[] = $child->ID; if ( ! is_page() ) return $excludes; global $post; foreach ( $this_heirarchy as $ancestor ) foreach ($this_children as $child) $this_heirarchy[] = $child->ID; }
URL: http://www.firesidemedia.net/dev/show-only-children-pages-on-parent-page/
Comments
