So, I've got an entirely custom theme which has a number of custom post-types.
I've also got a custom taxonomy which I can visit on the front end with URLs such as:
Which runs a query giving me results of posts that match the term 'custom-term' in the tax 'custom-tax'. Also paginates, etc.
When it comes to the custom post type pages, e.g. I've got a CPT of 'submissions' with the permalink slug set to 'your-reviews', the backend suggests the permalink will be:
I've checked out the WP template hierarchy and everything falls back to index.php which routes to the various custom templates that need to be used depending on the part of the site the user is visiting etc. So if I change the first line in index.php to a
I'd expect no matter which page I visit, I'd always get the message in the die statement even for the 404'ing custom post type page.
It's worth noting that I get a 404 whether I visit the 'archive' page at:
Or the individual page (some of which are 'hierarchical' and produce a permalink such as (the non-hierarchical pages also 404).
So, the code that generates this specific CPT (alongside a few others) is:
define( 'LL_POSTTYPE_ONELINER', 'll_submissions' ); $args = array( 'label' => __('Submissions'), 'labels' => $labels, 'public' => true, 'can_export' => true, 'show_ui' => true, '_builtin' => false, '_edit_link' => 'post.php?post=%d', // ? 'capability_type' => 'post', 'menu_icon' => get_bloginfo('template_url').'/images/thumb_up.png', 'hierarchical' => true, 'rewrite' => array( "slug" => "submissions" ), 'supports'=> array('title', 'thumbnail','page-attributes' ) , 'show_in_nav_menus' => true, 'query_var' => true, 'taxonomies' => array() ); register_post_type( LL_POSTTYPE_ONELINER, $args);
Note, whilst this one's marked as 'hierarchical' => 'true', others that aren't hierarchical also 404 in the same way.
And to follow up, from the reply I've had so far, out of the template hierarchy (single.php, etc...) I only have
index.php which it never hits.