Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Lets say I have created two custom post types A and B. Those post types are displayed in the Admin menu one after another. (After Posts for example)

Is there a way to display B under A?

The only similar behavior I am aware of is to assign Taxonomies to Post Types. This forces the first to be displayed under the second. I am looking for a way to do this using custom post types.

It's like having relationships across post types.

I am managing post types and taxonomies using the excellent GD CPT Tools plugin. Wordpress 3.4.2

share|improve this question
    
This is likely to be the answer. Haven't test it yet stackoverflow.com/a/8373533/245495 –  Odys Oct 27 '12 at 18:52

2 Answers 2

Yes, this capability is available with register_post_type, via the show_in_menu argument, but whether or not the particular plugin you are using supports this I don't know.

add_action( 'init', 'wpa70679_custom_types' );

function wpa70679_custom_types() {

    register_post_type( 'parent_type',
        array(
            'public' => true,
            'labels' => array(
                'name' => 'Parent post type'
            )
        )
    );

    register_post_type( 'child_type',
        array(
            'public' => true,
            'show_in_menu' => 'edit.php?post_type=parent_type',
            'labels' => array(
                'name' => 'Child post type'
            )
        )
    );

}

Results

share|improve this answer

Yes, if you are OK with using a (highly rated) plugin!

share|improve this answer
    
Been searching about an hour for something like this :p –  Odys Oct 27 '12 at 18:16
    
then there is your answer! –  Gaia Oct 27 '12 at 18:18
    
I think this does something else than my question. This allows posts (of whatever post-type) to be reordered. What I am looking is a way to do this within post types. –  Odys Oct 27 '12 at 18:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.