Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Yazı Türü

Yazı Türü

// Register Custom Taxonomy
function post_type() {

	$labels = array(
		'name'                       => _x( 'Yazı Türü', 'Taxonomy General Name', 'text_domain' ),
		'singular_name'              => _x( 'Yazı Türü', 'Taxonomy Singular Name', 'text_domain' ),
		'menu_name'                  => __( 'Yazı Türü', 'text_domain' ),
		'all_items'                  => __( 'Tümünü Listele', 'text_domain' ),
		'parent_item'                => __( 'Yazı Türü', 'text_domain' ),
		'parent_item_colon'          => __( 'Yazı Türü:', 'text_domain' ),
		'new_item_name'              => __( 'Yeni Yazı Türü Adı', 'text_domain' ),
		'add_new_item'               => __( 'Yeni Yazı Türü Ekle', 'text_domain' ),
		'edit_item'                  => __( 'Yazı Türü Düzenle', 'text_domain' ),
		'update_item'                => __( 'Güncelle', 'text_domain' ),
		'view_item'                  => __( 'Görüntüle', 'text_domain' ),
		'separate_items_with_commas' => __( 'Virgül ile ayırın', 'text_domain' ),
		'add_or_remove_items'        => __( 'Ekle veya Kaldır', 'text_domain' ),
		'choose_from_most_used'      => __( 'En Çok Kullanılanlar Arasından Seç', 'text_domain' ),
		'popular_items'              => __( 'En Çok Kullanılan', 'text_domain' ),
		'search_items'               => __( 'Arama', 'text_domain' ),
		'not_found'                  => __( 'Kayıt Bulunamadı', 'text_domain' ),
		'no_terms'                   => __( 'Kayıt yok', 'text_domain' ),
		'items_list'                 => __( 'Yazı Türü Listesi', 'text_domain' ),
		'items_list_navigation'      => __( 'Yazı Türü Listesi Menu', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                       => 'yazi-turu',
		'with_front'                 => true,
		'hierarchical'               => false,
	);
	$capabilities = array(
		'manage_terms'               => 'dra-post-type-manage-terms',
		'edit_terms'                 => 'dra-post-type-edit-terms',
		'delete_terms'               => 'dra-post-type-delete-terms',
		'assign_terms'               => 'dra-post-type-assign-terms',
	);
	$args = array(
		'labels'                     => $labels,
		'hierarchical'               => true,
		'public'                     => true,
		'show_ui'                    => true,
		'show_admin_column'          => true,
		'show_in_nav_menus'          => true,
		'show_tagcloud'              => true,
		'query_var'                  => 'dra-post-type',
		'rewrite'                    => $rewrite,
		'capabilities'               => $capabilities,
	);
	register_taxonomy( 'post-type', array( 'post' ), $args );

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