Are you looking for a way to add a new admin menu linking to custom admin panel? For customization in WordPress admin menu settings, we have created a quick code snippet that you can use create custom admin panel with add_menu_page
.
Instructions:
All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:
add_action('admin_menu', 'create_custom_panel'); function create_custom_panel() { add_menu_page('Custom panel', 'Custom panel', 'manage_options', 'custom-panel', 'custom_panel'); } function custom_panel(){ echo '<div class="wrap"><div id="icon-options-general" class="icon32"> <br> </div> <h2>Custom panel</h2></div>'; }
Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly add code snippets in WordPress, so you don’t accidentally break your site.
If you liked this code snippet, please consider checking out our other articles on the site like: 9 best WordPress help desk plugins and 50+ best responsive WordPress themes.
how could you add a few custom posts into this menu?
For example Can I include post.php on this page? How is that done?
Can you elaborate ?
Hello
I don’t understand what you say !!!For example, how can I execute commands post.php on this page?
Hi N3sted I need more detail before I can help, commands post.php i’m not sure what you mean.
thanks for the follow-up response
in this panel,how can I call the command post or other command ?
Thank you I found the solution
Thank you I found the solution
How can I customize this page to edit ” ?page=custom-panel ” ?
How can I customize this page to edit ” ?page=custom-panel ” ?