<?php 
/**
 * Register a book post type.
 *
 * @link http://codex.wordpress.org/Function_Reference/register_post_type
 */

$args = array( 'hierarchical' => true,
'label' => '',
'query_var' => true,
'rewrite' => true );

register_taxonomy('rate', 'Practice Areas', $args);

add_action('init', 'create_post_type');

function create_post_type() {
register_post_type('Practice Areas',
array(
'labels' => array(
'name' => __('Practice Areas'),
'singular_name' => __('Practice Areas')),
'public' => true,
'rewrite' => true,
'menu_position' => 8,
'supports' => array('title','editor','author','thumbnail','excerpt','comments','custom-fields','image'),
'has_archive' => true)
);
}







$args = array( 'hierarchical' => true,
'label' => '',
'query_var' => true,
'rewrite' => true );

register_taxonomy('header', ' Cases', $args);

add_action('init', 'create_post_type2');

function create_post_type2() {
register_post_type('Cases',
array(
'labels' => array(
'name' => __('Cases'),
'singular_name' => __('Cases')),
'public' => true,
'rewrite' => true,
'menu_position' => 8,
'supports' => array('title','editor','author','thumbnail','comments','custom-fields','image'),
'has_archive' => true)
);
}



add_action( 'add_meta_boxes', 'c3m_sponsor_meta' );
        function c3m_sponsor_meta() {
                add_meta_box( 'cases', 'Case Charges', 'c3m_sponsor_url_meta', 'cases', 'side', 'high' );
                }

            function c3m_sponsor_url_meta( $post ) {
                $c3m_sponsor_url = get_post_meta( $post->ID, 'case_charges', true);
                echo 'Please enter the Case Charges';
                ?>
                <input type="text" name="c3m_sponsor_url" value="<?php echo $c3m_sponsor_url; ?>" />
       <?php         
        }

add_action( 'save_post', 'c3m_save_project_meta' );
        function c3m_save_project_meta( $post_ID ) {
            global $post;
            if( $post->post_type == "cases" ) {
			
			$_POST['c3m_sponsor_url'];
				
            if (isset( $_POST ) ) {
                update_post_meta( $post_ID, 'case_charges', $_POST['c3m_sponsor_url'] );
            }
        }
        }