Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.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 如何将自定义帖子类型管理菜单添加到组中?_Php_Wordpress_Custom Post Type - Fatal编程技术网

Php 如何将自定义帖子类型管理菜单添加到组中?

Php 如何将自定义帖子类型管理菜单添加到组中?,php,wordpress,custom-post-type,Php,Wordpress,Custom Post Type,我已经跟随和文章添加了一个分隔符到管理菜单。问题是,如果我将“更新我的索引”添加到20,则我的自定义帖子类型菜单\位置为20(页面下方)。我添加了bbpress插件。那里的菜单位置是555555,但它位于外观页面上方 我怎样才能在不影响菜单位置的情况下创建上述内容?菜单位置35适合我,试试看 $args = array( 'labels' => $labels, 'public' => true,

我已经跟随和文章添加了一个分隔符到管理菜单。问题是,如果我将“更新我的索引”添加到20,则我的自定义帖子类型<代码>菜单\位置为20(页面下方)。我添加了bbpress插件。那里的
菜单位置是
555555
,但它位于外观页面上方


我怎样才能在不影响菜单位置的情况下创建上述内容?

菜单位置35适合我,试试看

$args = array(
        'labels'             => $labels,
        'public'             => true,
        'publicly_queryable' => true,
        'show_ui'            => true,
        'show_in_menu'       => true,
        'query_var'          => true,
        'rewrite'            => array( 'slug' => 'book' ),
        'capability_type'    => 'post',
        'has_archive'        => true,
        'hierarchical'       => false,
        'menu_position'       => 35,
        'supports'           => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
    );


    register_post_type( 'book', $args );

@Mifas如果对您有帮助,请接受此答案。