<?php 

add_action('init', 'esm_custom_posttype_register');

function esm_custom_posttype_register(){
	$labels = array(
		'name'               => _x( 'Promotions', 'post type general name', 'your-plugin-textdomain' ),
		'singular_name'      => _x( 'Promotion', 'post type singular name', 'your-plugin-textdomain' ),
		'menu_name'          => _x( 'Promotions', 'admin menu', 'your-plugin-textdomain' ),
		'name_admin_bar'     => _x( 'Promotion', 'add new on admin bar', 'your-plugin-textdomain' ),
		'add_new'            => _x( 'Add New', 'Promotion', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Promotion', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Promotion', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Promotion', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Promotion', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Promotions', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Promotions', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Promotions:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No promotions found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No promotions found in Trash.', 'your-plugin-textdomain' )
	);

	$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'promotion' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => 5,
		'supports'           => array( 'title','custom-fields','page-attributes', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
	);

	register_post_type( 'promotion', $args );


	$labels = array(
		'name'               => _x( 'Services', 'post type general name', 'your-plugin-textdomain' ),
		'singular_name'      => _x( 'Service', 'post type singular name', 'your-plugin-textdomain' ),
		'menu_name'          => _x( 'Services', 'admin menu', 'your-plugin-textdomain' ),
		'name_admin_bar'     => _x( 'Service', 'add new on admin bar', 'your-plugin-textdomain' ),
		'add_new'            => _x( 'Add New', 'Service', 'your-plugin-textdomain' ),
		'add_new_item'       => __( 'Add New Service', 'your-plugin-textdomain' ),
		'new_item'           => __( 'New Service', 'your-plugin-textdomain' ),
		'edit_item'          => __( 'Edit Service', 'your-plugin-textdomain' ),
		'view_item'          => __( 'View Service', 'your-plugin-textdomain' ),
		'all_items'          => __( 'All Services', 'your-plugin-textdomain' ),
		'search_items'       => __( 'Search Services', 'your-plugin-textdomain' ),
		'parent_item_colon'  => __( 'Parent Services:', 'your-plugin-textdomain' ),
		'not_found'          => __( 'No services found.', 'your-plugin-textdomain' ),
		'not_found_in_trash' => __( 'No services found in Trash.', 'your-plugin-textdomain' )
	);

	$args = array(
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'show_ui'            => true,
		'show_in_menu'       => true,
		'query_var'          => true,
		'rewrite'            => array( 'slug' => 'service' ),
		'capability_type'    => 'post',
		'has_archive'        => true,
		'hierarchical'       => false,
		'menu_position'      => 5,
		'supports'           => array( 'title','custom-fields','page-attributes', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' )
	);

	register_post_type( 'service', $args );

}




?>