Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php WordPress管理菜单hilighting错误的CPT项目_Php_Wordpress_Wp Admin - Fatal编程技术网

Php WordPress管理菜单hilighting错误的CPT项目

Php WordPress管理菜单hilighting错误的CPT项目,php,wordpress,wp-admin,Php,Wordpress,Wp Admin,我的自定义帖子类型有两个管理子菜单项,但只有第一个“常规设置”,在查看任一子菜单页时亮起 add_submenu_page( 'edit.php?post_type=landingpage', "General Settings", "General Settings", 'manage_options', "wp_cpt_plugin_page", 'my_callback'

我的自定义帖子类型有两个管理子菜单项,但只有第一个“常规设置”,在查看任一子菜单页时亮起

    add_submenu_page(
        'edit.php?post_type=landingpage',
        "General Settings", 
        "General Settings", 
        'manage_options', 
        "wp_cpt_plugin_page", 
        'my_callback'
    );
    add_submenu_page(
        'edit.php?post_type=landingpage', 
        'Form Settings',
        'Form Settings',
        'manage_options', 
        'wp_cpt_plugin_page&tab=form-settings', 
        'my_callback'
    );
查看页面时,如何使“表单设置”亮起?

检查:

add_submenu_page(
    'edit.php?post_type=landingpage', 
    'Form Settings',
    'Form Settings',
    'manage_options', 
    // This is the menu slug, you can not pass the arguments,
    // if you want to pass arguments then add only one sub menu page and
    // links with arguments, also display content with conditions of passed arguments.
    'wp_cpt_plugin_page-form-settings',
    'my_callback'
);