$this->add_meta_box( 'select_post_template', __( 'Post Template', 'custom-post-templates' ), 'select_post_template', 'post', 'side', 'default' );
To make a plugin work with custom post types, I've been told to change "post" to the name of the custom post type. Does anyone know if I can make it work with all custom post types (including regular posts) by changing this line somehow?
FYI, I found this at: http://wordpress.org/support/topic/custom-post-templates-with-custom-post-types-in-wp-30?replies=5#post-1679398
And it's in reference to the Custom Post Template plugin: http://wordpress.org/extend/plugins/custom-post-template/
Thanks in advance!
EDIT:
I've tried:
$post_types = get_post_types(array("public" => true));
foreach ($post_types as $post_type) {
$this->add_meta_box("select_post_template", __("Post Template", "custom-post-templates"), "select_post_template", $post_type, "side", "default");
}
But the custom post types still don't get the template selection menu. The posts do, just as they did with the original code. Thanks for suggestion... does anyone have another?
Note: Conceptually, the approach is solid. If I create my own array with a list of my custom post types, this code does add the templating to them.