Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter odie2

    (@odie2)

    Anyone?

    Thread Starter odie2

    (@odie2)

    For future readers, I added following to functions.php, but don’t tested deeply yet, but seems like working (also those child pages have properly canonical to /parent/child/ slug, so don’t worry about SEO):

    function rr_childpages_my_event() {
    	global $post;
    	if ( is_singular() && ! is_page() && $post->post_parent > 0 ) {
    		global $wp_query;
    		wp_redirect( get_permalink() );
    		//$wp_query->set_404();
    		//status_header(404);
    	}
    	return true;
    }
    add_action( 'wp', 'rr_childpages_my_event' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Child page old URL broken’ is closed to new replies.