Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Publications

AIDLR

// Register Custom Post Type
function book_post_type() {

	$labels = array(
		'name'                  => 'Publications',
		'singular_name'         => 'Publication',
		'menu_name'             => 'Publications',
		'name_admin_bar'        => 'Publications',
		'archives'              => 'Publications',
		'attributes'            => 'Publications Attributes',
		'parent_item_colon'     => 'Parent Item:',
		'all_items'             => 'All Publications',
		'add_new_item'          => 'Add New Publication',
		'add_new'               => 'Add New',
		'new_item'              => 'New Publication',
		'edit_item'             => 'Edit Publication',
		'update_item'           => 'Update Publication',
		'view_item'             => 'View Publication',
		'view_items'            => 'View Publications',
		'search_items'          => 'Search Publication',
		'not_found'             => 'Not found',
		'not_found_in_trash'    => 'Not found in Trash',
		'featured_image'        => 'Featured Image',
		'set_featured_image'    => 'Set featured image',
		'remove_featured_image' => 'Remove featured image',
		'use_featured_image'    => 'Use as featured image',
		'insert_into_item'      => 'Insert into publication',
		'uploaded_to_this_item' => 'Uploaded to this item',
		'items_list'            => 'Publications list',
		'items_list_navigation' => 'Publications list navigation',
		'filter_items_list'     => 'Filter publication list',
	);
	$args = array(
		'label'                 => 'Publication',
		'description'           => 'Publications',
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'comments', 'revisions', 'custom-fields' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'menu_icon'             => 'dashicons-book',
		'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',
		'show_in_rest'          => true,
	);
	register_post_type( 'publication', $args );

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