add new menu item to appearance Menus page

[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

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer