Hi. I’ve added a Custom Post Type to my site, but I can’t figure out what to type when I want to add the name and link to my template file as a category. How do I call up Post Type name and address from my php file?
Post Type Home Page: [https://wisekitten.com/cat-breeds/])
Post Type Content Page: [https://wisekitten.com/cat-breeds/york-chocolate/])
The codes are as follows;
function post_type_cat_breeds() {
$labels = array(
‘name’ => ‘Cat Breeds’,
‘singular_name’ => ‘Cat Breed’
);
$args = array(
‘labels’ => $labels,
‘has_archive’ => true,
‘public’ => true,
‘hierarchical’ => false,
‘supports’ => array(
‘title’,
‘editor’,
‘excerpt’,
‘author’,
‘custom-fields’,
‘thumbnail’,
‘comments’,
),
‘rewrite’ => array( ‘slug’ => ‘cat-breeds’ ),
‘show_in_rest’ => true,
);
register_post_type( ‘cat_breeds’, $args );
}
add_action( ‘init’, ‘post_type_cat_breeds’ );

Looks like it’s working well! Not sure what you’re trying to do. Add the name and link of what to which template where? Are you asking how to add categories to your custom post type?