我犯了与OP相同的错误,因为如何让它工作起来并不直观。通过阅读Administration Menus, 我找到了答案。
问题(对我来说)是编辑$parent_slug
调用中的参数add_submenu_page(...)
.
因此,在OP的情况下,您可以更改:
add_submenu_page(
\'woo-wholesale\',
\'Registrations\',
\'Registrations\',
\'manage_options\',
\'woo-wholesale-registrations\',
\'wwpr_page_call\'
);
收件人:
add_submenu_page(
\'edit.php?post_type=woo-wholesale\',
\'Registrations\',
\'Registrations\',
\'manage_options\',
\'woo-wholesale-registrations\',
\'wwpr_page_call\'
);