How to change the URL of sub menu page?

Question

I’m trying to add a sub page under users in admin panel and everything works fine but I have a little problem when clicking on the created page the url changes and refer to my page as query string not new php file

URL : http://localhost/wordpress/wp-admin/users.php?page=filtered.php

and I want : http://localhost/wordpress/wp-admin/filtered.php

is there any way to do so ?

function wporg_options_page(){

    add_submenu_page( 
        'users.php',
        'Filtered Users', 
        'Filtered Users', 
        'manage_options', 
        'filtered.php', 
        'filtered_user_page_html', 
        1 );
}
add_action('admin_menu', 'wporg_options_page');
0
, , Islam Hanafi 1 year 2020-07-22T09:10:28-05:00 0 Answers 50 views 0

Leave an answer

Browse
Browse