I used this code to create a menu page which loads mypluginpage.php and it works fine with my plugins.

I can access it from something like http://mysite/wp-admin/admin.php?page=myplugin


// Add menu
function myplugin_menu() {

    add_menu_page("myplugin", "my plugin","manage_options", "myplugin", "mypluginpage",plugins_url('/myplugin/img/icon.png'));

add_action("admin_menu", "myplugin_menu");

function mypluginpage(){
    include "mypluginpage.php";

Here is my issue: Inside mypluginpage.php below, I have a link that should take me to welcome.php within admin page


<a href="<?php echo admin_url('welcome.php'); ?>">Take me to welcome page within admin</a>


I thought am supposed to have something like this link below which will still keep me within admin page


but I got


which leads me to page not found

I need to have welcome.php page to called within admin. any help will be appreciated..

1 Answer 1


My problem was resolved by creating a sub menu page using add_submenu_page() function. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.