Page Templates – this code only works for one Custom Post Type
Dump the constant MY_CUSTOM_POST_TYPE use the $post->post_type instead. /** * Register the meta box */ add_action(‘add_meta_boxes’, ‘page_templates_dropdown_metabox’); function page_templates_dropdown_metabox(){ global $post; add_meta_box( $post->post_type.’-page-template’, __(‘Template’, ‘my_template’), ‘render_page_template_dropdown_metabox’, $post->post_type, ‘side’, #I prefer placement under the post actions meta box ‘low’ ); } /** * Render your metabox – This code is similar to what is rendered on … Read more