Support » Fixing WordPress » Adding custom meta boxes to custom template
4 years, 1 month ago
I am looking to display my custom meta boxes on a custom page tmeplate.
I have created the CMB without any problems along with the page template.
I have found some answers on various forums but these do not seem to work for me.
I have found the following:
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;
$template_file = get_post_meta($post_id,'_wp_page_template',TRUE);
if ($template_file == 'boxes.php')
Any help much appreciated