Php 重写后段塞重定向don';不适用于自定义职位状态

Php 重写后段塞重定向don';不适用于自定义职位状态,php,wordpress,redirect,slug,Php,Wordpress,Redirect,Slug,我有一个带有重写规则的自定义帖子类型: $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'exclude_from_search' => false, 'show_ui' => true, 'show_in_menu' => false, 'rewri

我有一个带有重写规则的自定义帖子类型:

$args = array( 'labels'         => $labels,
    'public'        => true,
    'publicly_queryable' => true,
    'exclude_from_search' => false,
    'show_ui'       => true,
    'show_in_menu'  => false,
    'rewrite'       => array( 'slug' => 'homework-tasks'),
    'hierarchical'  => TRUE,
    'capabilities'  => array( 'edit_post'=>'edit_emails',
    'read_post'=>'edit_emails', 'delete_post'=>'delete_emails' ),
    'supports'      => array( 'title','editor','revisions', 'comments' ),
);
register_post_type ( 'homework', $args);
和自定义职位状态:

            register_post_status( 'for_checking', [
                'public' => true
            ]);
问题是,具有新状态(用于检查)的帖子不会像以下那样重定向:

mysite.com/homework/post-name
->
mysite.com/homework-tasks/post-name