title: Wordpress Custom Post Type rewrite page and category slug
body: <p>I have set up a custom post type</p>
  
  <pre><code>register_post_type( 'Communities',
      array(
          'labels' =&gt; array(
          'name' =&gt; __( 'Communities' ),
          'singular_name' =&gt; __( 'Community' ),
          'not_found' =&gt; __( 'No Communities Found' )
          ),
          'public' =&gt; true,
          'rewrite' =&gt; array( 'slug' =&gt; '/%category%/communities', 'with_front' =&gt; false),
          'has_archive' =&gt; true,
          'hierarchical'  =&gt; true,
          'taxonomies'  =&gt; array( 'category' ),
          'supports' =&gt; array( 'title', 'editor', 'thumbnail', 'excerpt', 'custom-fields' ),
          'menu_icon' =&gt; 'dashicons-admin-home'
      )
  );
  </code></pre>
  
  <p>I have a pages setup with a city name that I need to remain as a page for different reasons, but I want communities in that city to be stored as a custom post type. I have setup categories for each city that I am adding communities to but I would like them to treat the cityname page as the parent.</p>
  
  <p>like this</p>
  
  <pre><code>www.sitename.com/cityname/communities/communityname/
  </code></pre>
  
  <p>I would like cityname to be a page, communities to be an archive page and the communityname to be a single page.</p>
  
  <p>Every solution I have found thus far generates 404 errors or conflicts with the parent page. </p>
  
  <p>Any help is appreciated. Thanks!</p>