admin管理员组

文章数量:1327935

Im trying to generate a duplicate page "edit.php" of the post_type "shop_order" beacuse i want the normal one from woocommerce and a custom one to add my code and columns.

Searching in google i find how to create edit.php for custom post types but no how to "replicate" the edit.php for existing post types.

I would put an example of what I have done but nothing has given any result...

Thanks all for your help and sorry for my english.

Here is the code i tryied but it only shows the top menu, the sub menu doesn't show.

add_action('admin_menu','add_my_menus', 10, 2);
function add_my_menus( ) { 
    add_menu_page(
        'Top Menu',
        'Top Menu',
        'manage_options',
        'topmymenu');
        
    add_submenu_page( 
        'edit.php?post_type=shop_order', 
        'submenu', 
        'submenu', 
        'manage_options', 
        'submymenu',
        'render_my_submenu' 
    );
}

function render_my_submenu() {
    echo 'Custom Link Page';
}

本文标签: custom post typesDuplicate the quotOrdersquot list on Admin Page