template structure for CPT not clear

Sorry I was using wrong structure, after looking through a bit more i found out exact difference for CPT and cutom taxonomies. For custom post types the template structure is like:-\ single-{post-type}.php archive-{post-type}.php search.php index.php And for Custom taxonomies, the template structure I found out from here:- Link:-Templates for Custom Post Types and Custom Taxonomies

This wp_query will not return any posts and only seems to work with post_status inherit?

This part require(‘./wp-blog-header.php’); is all kinds of bad idea. And if your file is indeed in plugin folder then header isn’t even in that location. Custom loads of WordPress core are brittle and the technique is typically only justifiable for performance reasons. It would be better to structure your endpoint via creating actual rewrite endpoint, … Read more

Custom post type updated to support comments, yet comments don’t appear

You can use a function called add_post_type_support Hook into init after the post types have been created, and add support for comments. add_action(‘init’, ‘my_cpt_add_excerpt’, 100); function my_cpt_add_excerpt() { add_post_type_support(‘mycpt’, ‘excerpt’); } …where mycpt is the name of your custom post type. If you want to do it cleanly, you can always deregister the custom post … Read more