I need a way to limit the meta box to a single page (ID=84) … if I do the following it works, but sbumit data does not go through and data is not saved …
add_action('admin_init','violin_init');
function violin_init()
{
if ($_GET['post'] == '84')
{
wp_enqueue_style('violin_admin_css', VIOLIN_THEME_PATH . '/custom/meta.css');
add_meta_box('violin_options_meta', 'Highlight Content', 'violin_options_meta', 'page', 'normal', 'high');
add_action('save_post','violin_save_meta');
}
}
I’ve found a solution that works, but I wish there was a way through the wordpress API and/or one of wordpress’ globals …
the following works:
Additionally you can also filter by a specific template:
I wrote a blog post on it: Page Specific WordPress Meta Box