Redirecting Pages
-
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 workingIs there any better way of doing this? I’m sure I’m overlooking something simple
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Redirecting Pages’ is closed to new replies.