set permalink for CPT

I have a CPT and two custom taxonomy I registered.
I also registered the taxonomy for the CPT.
This is my register code:

 $args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true, 
'show_in_menu' => true, 
'query_var' => true,
'rewrite' => array( 'slug' => 'provider' ),
'capability_type' => 'page',
'has_archive' => false, 
'hierarchical' => false,
'menu_position' => null,
 'register_meta_box_cb' => 'init_metaboxes_gallery',
    'supports' => array( 'title', 'editor', 'custom-fields', 'thumbnail', 'excerpt', 'comments' )
  ); 

  register_post_type( 'provider', $args );



$args = array(
        'hierarchical'      => true,
        'labels'            => $labels,
        'show_ui'           => true,
        'show_admin_column' => true,
        'query_var'         => true,
        'rewrite'           => array( 'slug' => 'zone','hierarchical' =>'true' ),
    );

    register_taxonomy( 'zone', array( 'provider' ), $args );

$args = array(
        'hierarchical'      => true,
        'labels'            => $labelscat,
        'show_ui'           => true,
        'show_admin_column' => true,
        'query_var'         => true,
        'rewrite'           => array( 'slug' => 'procat','hierarchical' =>'true' ),
    );

    register_taxonomy( 'procat', array( 'provider' ), $args );

Of curse I set labels for each register.
I want that the link will be:

Read More
www.mysite.com/procat/procat-sub/zone/zone-sub

If there isn’t sub for the procat or for the zone it will be without the sub, of course.

So I set the sructure of the permalink on admin panel to:

/%procat%/%zone%/%postname%/

but the url is still

www.mysite.com/provider/provider-name

Related posts