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.

I recently asked a question the other day and got what I was looking for. Today I put that knowledge to practice, but I can't seem to figure how to remove the title and editor fields from the "edit" page.

Below shows the arguments I'm using with register_post_type. Logically, I think providing an empty array for "supports" would make it not support anything by default. Am I missing something?

        $v_args = array(
                'labels' => array (
                        'name' => 'Visitors',
                        'singular_name' => 'Visitor',
                        'add_new_item' => 'Register New Visitor',
                    ),
                'public' => true,
                'publicly_queryable' => false,
                'exclude_from_search' => true,
                'show_ui' => true,
                'hiearchical' => false,
                'supports' => array( ),
            );

Thanks,
-Zack

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

You were close .) This works:

'supports' => array( '' ),
share|improve this answer
1  
I knew I was going to slap myself when the answer came. Thank you ;) –  Zack Jan 10 '11 at 22:27
    
The trick is that you need to get past empty(). Just array() won't work, but array( '' ) will. –  Jan Fabry Jan 14 '11 at 15:58
add comment

I think you need something in there. Title & Editor are the defaults when nothing is present, so adding something may remove those two (though I've never tested it), i.e.:

'author' 'thumbnail' 'excerpt' 'trackbacks' 'custom-fields' 'comments' 'revisions' 'page-attributes'

share|improve this answer
add comment

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.