Olay Ayı
if ( ! function_exists( 'olay_ayi' ) ) {
// Register Custom Taxonomy
function olay_ayi() {
$labels = array(
'name' => _x( 'Aylar', 'Taxonomy General Name', 'text_domain' ),
'singular_name' => _x( 'Ay', 'Taxonomy Singular Name', 'text_domain' ),
'menu_name' => __( 'Aylar', 'text_domain' ),
'all_items' => __( 'Tüm Aylar', 'text_domain' ),
'parent_item' => __( 'Üst Ay', 'text_domain' ),
'parent_item_colon' => __( 'Üst Ay:', 'text_domain' ),
'new_item_name' => __( 'Yeni Ay İsmi', 'text_domain' ),
'add_new_item' => __( 'Yeni Ay Ekle', 'text_domain' ),
'edit_item' => __( 'Ayı Düzenle', 'text_domain' ),
'update_item' => __( 'Ayı Güncelle', 'text_domain' ),
'view_item' => __( 'Ayı Görüntüle', 'text_domain' ),
'separate_items_with_commas' => __( 'Separate items with commas', 'text_domain' ),
'add_or_remove_items' => __( 'Add or remove items', 'text_domain' ),
'choose_from_most_used' => __( 'Choose from the most used', 'text_domain' ),
'popular_items' => __( 'Popüler Aylar', 'text_domain' ),
'search_items' => __( 'Ay Arama', 'text_domain' ),
'not_found' => __( 'Bulunamadı', 'text_domain' ),
'no_terms' => __( 'Ay yok', 'text_domain' ),
'items_list' => __( 'Ay listesi', 'text_domain' ),
'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),
);
$rewrite = array(
'slug' => 'ay',
'with_front' => true,
'hierarchical' => false,
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
'rewrite' => $rewrite,
'show_in_rest' => true,
);
register_taxonomy( 'ay', array( 'post' ), $args );
}
add_action( 'init', 'olay_ayi', 0 );
}