If you have:
register_post_type( 'my_custom_post_type', $args );
And you need a custom page to displays all entries from this custom post type, you have to create: archive-my_custom_post_type.php
.
But if you don’t need a custom page, wordpress will use archive.php to display you custom post type archive.
If you only need to customize the entry page, you have to create: single-my_custom_post_type.php
Where are you creating the custom post type, in theme functions.php or using a plugin?
If using functions.php, you need to create archive-my_custom_post_type.php
or single-my_custom_post_type.php
in theme’s folder.
If using a plugin, you need to create archive-my_custom_post_type.php
or single-my_custom_post_type.php
in plugins’s folder and point wordpress to read it, so include this function in your plugin:
function get_custom_post_type_template($template) { global $post; if ($post->post_type == 'my_custom_post_type') { $template = dirname( __FILE__ ) . '/archive-my_custom_post_type.php'; } return $template; } //add_filter( "single_template", "get_custom_post_type_template" ); //for single page add_filter( "archive_template", "get_custom_post_type_template" ); //for archive