WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] 3.5 RC5: Custom Post Type menu issue (3 posts)

  1. Abel S
    Member
    Posted 1 year ago #

    To reproduce, please create 3 custom post types.

    'Custom_post_type_1', array(...)

    'Custom_post_type_2', array(...
    'show_in_menu' => 'edit.php?post_type=Custom_post_type_1'
    ...)

    'Custom_post_type_3', array(...
    'show_in_menu' => 'edit.php?post_type=Custom_post_type_1'
    ...)

    When you go to "Add New Custom_post_type_2" OR "Add New Custom_post_type_3", the "Posts" > "Add New" menu item is highlighted. In WP 3.4 and earlier, the Custom_post_type_1 menu item is highlighted when performing the previous step. Editing works as expected (i.e. the correct menu item is highlighted) in 3.5.

  2. Andrew Nacin
    Lead Developer
    Posted 1 year ago #

    Works with this code:

    add_action( 'init', function() {
    	register_post_type( 'test1', array(
    		'show_ui' => true,
    	) );
    
    	register_post_type( 'test2', array(
    		'show_ui' => true,
    		'show_in_menu' => 'edit.php?post_type=test1',
    	) );
    
    	register_post_type( 'test3', array(
    		'show_ui' => true,
    		'show_in_menu' => 'edit.php?post_type=test1',
    	) );
    });
  3. Abel S
    Member
    Posted 1 year ago #

    Andrew, it is working indeed (I just tried it on a fresh install). Admin Menu Editor was the culprit but looks like they fixed it in today's release. I will be doing all tests on the fresh install henceforth.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic