add_action('init', 'create_foo'); function create_foo() { $foo_args = array( 'label' => __('Foo'), 'singular_label' => __('Foo'), 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => true, 'rewrite' => true, 'supports' => array('title', 'editor', 'excerpt', 'thumbnail') ); register_post_type('foo',$foo_args); } add_action("admin_init", "add_foo"); add_action('save_post', 'update_website_url'); function add_foo(){ add_meta_box("foo_details", "Foo Options", "foo_options", "foo", "normal", "low"); } function foo_options(){ global $post; if (isset($custom['website_url']) && isset($custom['website_url'][0])) { $website_url = isset($custom['website_url']) ? $custom['website_url'][0] : '';} ?>