rspisarski
10/4/2017 - 7:57 PM

Custom Post Type

// Creates Plans Custom Post Type
function plans_post() {
	$args = array(
		'label' => 'Plans',
		'public' => true,
		'show_ui' => true,
		'capability_type' => 'post',
		'hierarchical' => true,
		'rewrite' => array('slug' => 'plans'),
		'query_var' => true,
		'menu_icon' => 'dashicons-list-view',
		'supports' => array(
			'title',
			'editor',
			'revisions',
			'thumbnail',
			'page-attributes')
	);
	register_post_type( 'plans', $args );
}
add_action( 'init', 'plans_post' );
'rewrite'  => array( 'slug' => 'projects', 'with_front' => false ),