Title

WP Admin add custom link to sidebar

description

Short snippet to add a menu item to the WP Admin dashboard sidebar menu. In this example, the Elementor forms submissions page.

Published 2022-08-16

Modified 2022-08-19

content

				
					add_action('admin_menu', 'custom_admin_menu');
        function custom_admin_menu() {
        //internal relative url
            add_menu_page( 'inschrijvingen_link', 'Inschrijvingen', 'manage_options', 'e-form-submissions', '', 'dashicons-email', 2  );
        //external url
            add_menu_page('google_link', 'Google', 'read', 'https://google.com/', '', 'dashicons-text', 1);
    }