Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Reflectioins

if ( ! function_exists('homilies_reflections_post_type') ) {

// Register Custom Post Type
function homilies_reflections_post_type() {

	$labels = array(
		'name'                  => _x( 'Homilies / Reflections', 'Post Type General Name', 'text_domain' ),
		'singular_name'         => _x( 'Homily / Reflection', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'             => __( 'Homilies & Reflections', 'text_domain' ),
		'name_admin_bar'        => __( 'Homilies & Reflections', 'text_domain' ),
		'parent_item_colon'     => __( 'Parent Homily / Reflection:', 'text_domain' ),
		'all_items'             => __( 'All Homilies & Reflections', 'text_domain' ),
		'add_new_item'          => __( 'Add New Homily / Reflection', 'text_domain' ),
		'add_new'               => __( 'Add New Homily / Reflection', 'text_domain' ),
		'new_item'              => __( 'New Homily / Reflection', 'text_domain' ),
		'edit_item'             => __( 'Edit Homily / Reflection', 'text_domain' ),
		'update_item'           => __( 'Update Homily / Reflection', 'text_domain' ),
		'view_item'             => __( 'View Homily / Reflection', 'text_domain' ),
		'search_items'          => __( 'Search Homilies & Reflections', 'text_domain' ),
		'not_found'             => __( 'Homily / Reflection not found', 'text_domain' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'text_domain' ),
		'items_list'            => __( 'Homilies / Reflections list', 'text_domain' ),
		'items_list_navigation' => __( 'Homilies / Reflections list navigation', 'text_domain' ),
		'filter_items_list'     => __( 'Filter Homilies / Reflections list', 'text_domain' ),
	);
	$args = array(
		'label'                 => __( 'Homily / Reflection', 'text_domain' ),
		'description'           => __( 'Homilies & Reflections', 'text_domain' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', ),
		'taxonomies'            => array( 'homilies_reflections_category' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-admin-comments',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,		
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'post',
	);
	register_post_type( 'homilies_reflections', $args );

}
add_action( 'init', 'homilies_reflections_post_type', 0 );

}