Custom Admin Page WordPress

 In Wordpress Admin

How to add an admin menu page on WordPress.

The function myplugin_options_pagefunction will register the admin page and the myplugin_render_options_page function will rendering the admin page. These functions could be useful for admin information or with a bit more work you can easily enhance these functions to be part of your website options.

function myplugin_options_page()
// add top level menu page
'Options Page',
'Options Page Title',
add_action('admin_menu', 'myplugin_options_page');
function myplugin_render_options_page() {
if (!current_user_can('manage_options')) {
} ?>
<div class="wrap">
<h1><?php echo esc_html(get_admin_page_title()); ?></h1>
<p>Page content goes here</p>


Recommended Posts

Leave a Comment

Start typing and press Enter to search