From code for post type and custom taxonomy, your CPT is post_features
and taxonomy is features
.
For single post_features
, you need to have file named single-post_features.php
. For archive, create file taxonomy-features.php
.
See documentation for detail. https://codex.wordpress.org/Post_Type_Templates
Example for single(single-post_features.php):
<?php get_header(); ?>
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
the_title();
the_content();
} // end while
} // end if
?>
<?php get_footer(); ?>
Example for Archive(taxonomy-features.php):
<?php get_header(); ?>
<?php
if ( have_posts() ) {
the_archive_title( '<h1>', '</h1>' );
while ( have_posts() ) {
the_post();
the_title();
the_content();
} // end while
} // end if
?>
<?php get_footer(); ?>
Note: Please flush your permalink if you are getting 404 error.