[ad_1]
This adds a custom meta box:
if ( !class_exists('DM_Custom_MetaBox')) {
class DM_Custom_MetaBox {
public function add_nav_menu_meta_boxes() {
add_meta_box(
'custom-meta-box',
'Custom Meta Box',
array( $this, 'nav_menu_link'),
'nav-menus',
'side',
'low'
);
}
public function nav_menu_link() {
echo 'Custom Meta Box';
}
}
}
$custom_meta_box = new DM_Custom_MetaBox;
add_action('admin_init', array($custom_meta_box, 'add_nav_menu_meta_boxes'));
Thank you for your code example. Did not get it to work, but it helped. I did not realize that it was just another meta_box. I saw that you use ‘nav-menus’ so I was able to get a working start.
Thanks
