0

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

2 Answers 2

3

You were close .) This works:

'supports' => array( '' ),
2
  • 1
    I knew I was going to slap myself when the answer came. Thank you ;) Commented Jan 10, 2011 at 22:27
  • The trick is that you need to get past empty(). Just array() won't work, but array( '' ) will. Commented Jan 14, 2011 at 15:58
0

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'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.