I'm doing some custom coding and creating a new page template to use for a new page within Wordpress. I'm trying to add a meta box to the page to be displayed as output to the user. I tried to do the following in my page template:
add_meta_box( 'submitdiv', __( 'Publish' ), 'post_submit_meta_box', null, 'side', 'core' );
When I go to the URL to display the new page I created I get the following error message:
Fatal error: Call to undefined function get_current_screen() in D:\My Documents\xampp_new\xampp\htdocs\bmt\wp-admin\includes\template.php on line 921
How can I add meta boxes to be displayed to an end user?