apamphilon

Redirect child page to parent

<?php if ( $post->post_parent ) {
    wp_redirect( get_permalink( $post->post_parent ) );
    exit;
} ?>

Remember to add before <code>get_header();</code>


Comments: