Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Features creative-footprint

if ( ! function_exists('publications') ) {

// Register Custom Post Type
function publications() {

	$labels = array(
		'name'                  => _x( 'Publications', 'Post Type General Name', 'cf' ),
		'singular_name'         => _x( 'Publication', 'Post Type Singular Name', 'cf' ),
		'menu_name'             => __( 'Publications', 'cf' ),
		'name_admin_bar'        => __( 'Publications', 'cf' ),
		'archives'              => __( 'Publication Archives', 'cf' ),
		'attributes'            => __( 'Publication Attributes', 'cf' ),
		'parent_item_colon'     => __( 'Parent Publication:', 'cf' ),
		'all_items'             => __( 'All Publications', 'cf' ),
		'add_new_item'          => __( 'Add New Publication', 'cf' ),
		'add_new'               => __( 'Add New', 'cf' ),
		'new_item'              => __( 'New Publication', 'cf' ),
		'edit_item'             => __( 'Edit Publication', 'cf' ),
		'update_item'           => __( 'Update Publication', 'cf' ),
		'view_item'             => __( 'View Publication', 'cf' ),
		'view_items'            => __( 'View Publications', 'cf' ),
		'search_items'          => __( 'Search Publication', 'cf' ),
		'not_found'             => __( 'Not found', 'cf' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'cf' ),
		'featured_image'        => __( 'Featured Image', 'cf' ),
		'set_featured_image'    => __( 'Set featured image', 'cf' ),
		'remove_featured_image' => __( 'Remove featured image', 'cf' ),
		'use_featured_image'    => __( 'Use as featured image', 'cf' ),
		'insert_into_item'      => __( 'Insert into publication', 'cf' ),
		'uploaded_to_this_item' => __( 'Uploaded to this publication', 'cf' ),
		'items_list'            => __( 'Publications list', 'cf' ),
		'items_list_navigation' => __( 'Publications list navigation', 'cf' ),
		'filter_items_list'     => __( 'Filter publications list', 'cf' ),
	);
	$args = array(
		'label'                 => __( 'Publication', 'cf' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'thumbnail', 'page-attributes' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 20,
		'menu_icon'             => 'dashicons-visibility',
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => 'publications',
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'page',
	);
	register_post_type( 'publication', $args );

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

}