This is exactly what I want to do as well.
Simon, any thoughts?
I think with a filter in funcionts.php is more than enough π
I answered my own question, the code to add is in the “Other Notes” section of the plugin page. Simply add it to functions.php and add your custom post type name:
/**
* Hooks the WP cpt_post_types filter
*
* @param array $post_types An array of post type names that the templates be used by
* @return array The array of post type names that the templates be used by
**/
function my_cpt_post_types( $post_types ) {
$post_types[] = ‘movie’;
$post_types[] = ‘actor’;
return $post_types;
}
add_filter( ‘cpt_post_types’, ‘my_cpt_post_types’ );
This is probably not the best way but works: I reset $post_types array or update first position.
function my_cpt_post_types( $post_types ) {
$post_types = [];
$post_types[] = 'projetos';
return $post_types;
}
or
function my_cpt_post_types( $post_types ) {
$post_types[0] = 'projetos';
return $post_types;
}
It works! π thanx @gtso86