Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 12 lines (12 sloc) 0.275 kB
d0d00bb adding submenu template
Nick DiMatteo authored
1 <?php
2 /*
3 Template Name: Sub | Parent
4 */
5 $pagekids = get_pages("child_of=".$post->ID."&sort_column=menu_order");
6 if ($pagekids) {
7 $firstchild = $pagekids[0];
8 wp_redirect(get_permalink($firstchild->ID));
9 } else {
10 // Do whatever templating you want as a fall-back.
11 }
12 ?>
Something went wrong with that request. Please try again.