title: Adding Taxonomy details to a custom post type - to get SEO details to show
body: <ol>
  <li>I created a simple catalogue of memorial posts using (Wordpress Custom Post Type)</li>
  <li>Settings has archive set to - TRUE</li>
  <li>Created a single-memorial-wall.php</li>
  <li>Created an archive-memorial-wall.php</li>
  </ol>
  <p>Everything works, but <strong>Yoast</strong> is unable to help my client with SEO for this archive page, as it's not got a page or category to attach itself to and as such (view source code image) the page title is incorrect, and no description details show up for the page.</p>
  <p>So I thought, I could sort this creating a custom taxonomy...(code below) and then make this default for these post types.</p>
  <p>However, by just creating a taxonomy, I just add more un necessary complexity, the client has to of course, create a category type, and attach each post to it like with regular posts. (even though all the custom posts will only ever go to this taxonomy).</p>
  <p>The reason for the CPT was to give the client a simple dashboard without the need to tick categories, where the simple posts he creates ALWAYS attach to the correct category archive and this be SEO indexable.</p>
  <p>What am I missing here... It would be great if the taxonomy area i've created didn't allow for further categorisation and was just the place where the SEO for the has_archive lived.</p>
  <p><a href="https://i.stack.imgur.com/ZI91d.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZI91d.jpg" alt="enter image description here" /></a></p>
  <pre><code>function custom_memorial_post_type()
  {
      $args = array(
          'public' =&gt; true,
          'publicly_queryable' =&gt; true,
          'show_ui' =&gt; true,
          'exclude_from_search' =&gt; true,
          'show_in_nav_menus' =&gt; false,
          'has_archive' =&gt; true,
          'hierarchical' =&gt; true,
          'labels' =&gt; array(
              'name' =&gt; 'Memorials',
              'singular_name' =&gt; 'Memorial',
              'add_new' =&gt; __('Add A Memorial'),
              'add_new_item' =&gt; __('New Memorial'),
              'edit_item' =&gt; __('Edit The Memorial'),
              'new_item' =&gt; __('New Memorial'),
              'all_items' =&gt; __('All Memorials'),
              'view_items' =&gt; __('View Memorials'),
              'menu_name' =&gt; 'Memorials'
          ),
          'supports' =&gt; array(
              'title',
              'custom-fields',
              'post-formats'
          ),
          'description' =&gt; 'Pet memorial',
          'menu_position' =&gt; 22,
          'menu_icon' =&gt; 'dashicons-format-image',
      );
      register_post_type('memorial-wall', $args);
  }
  add_action('init', 'custom_memorial_post_type');
  
  function memorial_wall_taxonomy() {
      $args = array(
          'labels' =&gt; array(
              'name' =&gt; 'Memorial Wall',
              'singular_name' =&gt; 'Memorial Wall',
              'parent_item' =&gt; __('Parent Memorial Wall Category'),
              'parent_item_colon' =&gt; __('Parent Memorial Wall Category:'),
              'edit_item' =&gt; __('Edit The Memorial Wall Category'),
              'update_item' =&gt; __('Update The Memorial Wall Category'),
              'add_new_item' =&gt; __('Add New Memorial Wall Category'),
              'new_item_name' =&gt; __('New Memorial Wall Category'),
              'menu_name' =&gt; 'Memorials Wall SEO'
          ),
          'public' =&gt; true,
          'hierarchical' =&gt; true
      );
      register_taxonomy('memorial-taxonomy', array('memorial-wall'), $args);
  }
  add_action( 'init', 'memorial_wall_taxonomy');
  </code></pre>