Adding items to page template dropdown on Page Edit Screen
I thought I would provide you with another approach. It is also a bit hackish, but it is general purpose and allows you to simply register the filename and label that you want to use, like so: if ( class_exists( ‘WPSE_196995_Page_Templates’ ) ) { WPSE_196995_Page_Templates::register_page_template( ‘My Page Template’, ‘my-page-template.php’ ); } You could add the … Read more