title: How to use a custom post type slug within another custom post type's slug
body: <p>I have created two custom post types in my wordpress project: <strong>city</strong> and <strong>property</strong> using the below query.</p>
  <pre><code>register_post_type('city',
              array(
                  'labels' =&gt; array(
                      'name' =&gt; __('City', 'dc_qode'),
                      'singular_name' =&gt; __('City', 'dc_qode'),
                  ),
                  'public'    =&gt;  true,
                  'show_in_menu'  =&gt;  true,
                  'rewrite'     =&gt;  array('slug' =&gt; 'city'),
                  'show_ui'   =&gt;  true,
                  'has_archive' =&gt;  false,
                  'hierarchical'  =&gt;  true,
                  'show_tagcloud' =&gt; false,
                  'supports' =&gt; array(
                      'title',
                      'editor',
                      'thumbnail',
                  ),
                  'can_export' =&gt; true,
                  'taxonomies' =&gt; array( 'city'),
              )
          );
  
  
  register_post_type('property',
              array(
                  'labels' =&gt; array(
                      'name' =&gt; __('Property', 'dc_qode'),
                      'singular_name' =&gt; __('Property', 'dc_qode'),
                  ),
                  'public'    =&gt;  true,
                  'show_in_menu'  =&gt;  true,
                  'rewrite'     =&gt;  array('slug' =&gt; 'property'),
                  'show_ui'   =&gt;  true,
                  'has_archive' =&gt;  false,
                  'hierarchical'  =&gt;  true,
                  'show_tagcloud' =&gt; false,
                  'supports' =&gt; array(
                      'title',
                      'editor',
                      'thumbnail',
                  ),
                  'can_export' =&gt; true,
                  'taxonomies' =&gt; array( 'property'),
              )
          );
  </code></pre>
  <p>Using this, I can access any property using the url <code>http://domain-name.com/property/property-name</code>. But I want to access the url as <code>http://domain-name.com/city-name/property-name</code> (for eg. <code>http://domain-name.com/toronto/abcproperty</code>). The city-name will be assigned with each property. I tried to use the slug, 'city', within property as:</p>
  <pre><code>'rewrite' =&gt; array('slug' =&gt; '%city%') 
  </code></pre>
  <p>in place of</p>
  <pre><code>'rewrite'     =&gt;  array('slug' =&gt; 'property')
  </code></pre>
  <p>But it's not working.</p>
  <p>How can I achieve this scenario?</p>