Add Custom Admin Menu Item
Adds a custom menu item to the WordPress admin menu
PHP
function add_custom_menu_item() {
add_menu_page('Custom Page', 'Custom Menu', 'manage_options', 'custom-page', 'custom_page_content', 'dashicons-admin-generic', 6);
}
add_action('admin_menu', 'add_custom_menu_item');
function custom_page_content() {
echo '<h1>Welcome to the Custom Page</h1>';
}
Snippet Feedback
Did this snippet work for you? Do you have any questions about this snippet? Leave some feedback below.
SHARED BY
2 Views