How to add custom post type admin menu into a group?

I’ve followed this and this article to add a separator to admin menu. Problem is my custom post type menu_position is 20(below Pages) if I add update my index to 20 my Menu is removed. I’ve added bbpress plugin. There menu_position is 555555 but it is above the Appearance Page.

enter image description here

Read More

How can I create something like above without messing with menu_position?

Related posts

Leave a Reply

1 comment

  1. Menu position 35 is worked for me, try it

    $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 );
    

    enter image description here