Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Paulo Coelho Media Items

All multi-media items relating to Paulo Coelho’s life and work.

if ( ! function_exists('pc_media_library') ) {

// Register Custom Post Type
function pc_media_library() {

	$labels = array(
		'name'                  => _x( 'Media Items', 'Post Type General Name', 'paulo_coehlo' ),
		'singular_name'         => _x( 'Media Item', 'Post Type Singular Name', 'paulo_coehlo' ),
		'menu_name'             => __( 'Media Library', 'paulo_coehlo' ),
		'name_admin_bar'        => __( 'Media Library', 'paulo_coehlo' ),
		'archives'              => __( 'Media Library Archives', 'paulo_coehlo' ),
		'attributes'            => __( 'Media Item Attributes', 'paulo_coehlo' ),
		'parent_item_colon'     => __( 'Parent Media Item:', 'paulo_coehlo' ),
		'all_items'             => __( 'All Media Items', 'paulo_coehlo' ),
		'add_new_item'          => __( 'Add New Media Item', 'paulo_coehlo' ),
		'add_new'               => __( 'Add New Media Item', 'paulo_coehlo' ),
		'new_item'              => __( 'New Media Item', 'paulo_coehlo' ),
		'edit_item'             => __( 'Edit Media Item', 'paulo_coehlo' ),
		'update_item'           => __( 'Update Media Item', 'paulo_coehlo' ),
		'view_item'             => __( 'View Media Item', 'paulo_coehlo' ),
		'view_items'            => __( 'View Media Items', 'paulo_coehlo' ),
		'search_items'          => __( 'Search Media Library', 'paulo_coehlo' ),
		'not_found'             => __( 'Not found', 'paulo_coehlo' ),
		'not_found_in_trash'    => __( 'Not found in Trash', 'paulo_coehlo' ),
		'featured_image'        => __( 'Featured Image', 'paulo_coehlo' ),
		'set_featured_image'    => __( 'Set featured image', 'paulo_coehlo' ),
		'remove_featured_image' => __( 'Remove featured image', 'paulo_coehlo' ),
		'use_featured_image'    => __( 'Use as featured image', 'paulo_coehlo' ),
		'insert_into_item'      => __( 'Insert into media item', 'paulo_coehlo' ),
		'uploaded_to_this_item' => __( 'Uploaded to this media item', 'paulo_coehlo' ),
		'items_list'            => __( 'Media items list', 'paulo_coehlo' ),
		'items_list_navigation' => __( 'Media items list navigation', 'paulo_coehlo' ),
		'filter_items_list'     => __( 'Filter media items list', 'paulo_coehlo' ),
	);
	$args = array(
		'label'                 => __( 'Media Item', 'paulo_coehlo' ),
		'description'           => __( 'All multi-media related to Paulo Coelho', 'paulo_coehlo' ),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'revisions', 'custom-fields', 'page-attributes', 'post-formats' ),
		'taxonomies'            => array( 'category', 'post_tag' ),
		'hierarchical'          => false,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 15,
		'menu_icon'             => 'dashicons-admin-media',
		'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( 'pc_media_libary', $args );

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

}