I have 5 pages on my WP install, and each of the pages has 4-6 child pages.
On clicking a link for one of the pages I want it to redirect to its first child.
I'm using this code to find the first child link
$subPage = $wpdb->get_var("SELECT guid FROM $wpdb->posts WHERE post_parent = " . $pageID . " ORDER BY menu_order");
I thought I'd try using wp_redirect($subPage)
but it's not working
Is there any better way of doing this? I'm sure I'm overlooking something simple