id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses 21561 is_page_template() doesn't work in admin edit page screen l3rady "Take this use case scenario: ''I want to show a meta box on the page edit screen when a certain template is set.'' To do the above I'd use some code like this: {{{ public static function add_meta_boxes( $post_type, $post ) { if( ""page"" != $post_type ) return; if ( ! is_page_template('templates/with-solutions.php') ) return; add_meta_box(""bs_SolutionsMeta-meta"", ""Solutions"", array( __CLASS__, ""solutions_meta"" ), ""page"", ""normal"", ""low""); } }}} Unfortunately the above won't work as is_page_template() does an is_page() check in its function which will fail when run in admin. I'd like to propose that the function be worked on to allow this function work in the admin some way. I have found a work around and used: {{{ if ( 'templates/with-solutions.php' != get_page_template_slug( $post->ID ) ) return; }}} for now but I'd love to see that function functional in admin." feature request closed normal Template 3.4.1 trivial wontfix