label; foreach ( $post_types as $post_type => $label ) { $condition = new Post( [ 'post_type' => $post_type, ] ); $this->register_sub_condition( $condition ); } $this->sub_conditions[] = 'child_of'; $this->sub_conditions[] = 'any_child_of'; $this->sub_conditions[] = 'by_author'; // Last condition. $this->sub_conditions[] = 'not_found404'; } public function check( $args ) { return ( is_singular() && ! is_embed() ) || is_404(); } }