alexjamesbrown / JoeBlogs

Wordpress / Metaweblog API Wrapper
53 stars 40 forks source link

Custom Taxonomy Post? #50

Open FisherWooD opened 8 years ago

FisherWooD commented 8 years ago

Hi I use jeoblogs and work very very good.

But I have small problem my theme have custom Taxonomy areas so I cannot post this area .S

my theme register custom Taxonomy codes

function add_custom_taxonomies() { register_taxonomy('imdb', 'post', array('hierarchical' => false, 'labels' => array('name' => _x('IMDB', 'taxonomy general name'), 'singular_name' => _x('IMDB Puanı', 'taxonomy singular name'), 'search_items' => ('IMDB Puanı ara'), 'all_items' => __('Tüm IMDB Puanları'), 'edit_item' => ('IMDB Puanı düzenle'), 'update_item' => ('IMDB Puanı güncelle'), 'add_new_item' => ('Yeni IMDB Puanı ekle'), 'new_item_name' => ('Yeni IMDB Puanı'), 'menu_name' => ('IMDB Puanları'),), 'rewrite' => array('slug' => 'imdb', // This controls the base slug that will display before each term 'with_front' => false, // Don't display the category base before "/locations/" 'hierarchical' => false // This will allow URL's like "/locations/boston/cambridge/" ),)); register_taxonomy('oyuncu', 'post', array('hierarchical' => false, 'labels' => array('name' => _x('Oyuncu', 'taxonomy general name'), 'singular_name' => _x('Oyuncu', 'taxonomy singular name'), 'search_items' => ('Oyuncu ara'), 'all_items' => ('Tüm oyuncular'), 'edit_item' => ('Oyuncu düzenle'), 'update_item' => ('Oyuncu güncelle'), 'add_new_item' => ('Yeni oyuncu ekle'), 'new_item_name' => __('Yeni oyuncu adı'), 'menu_name' => ('Oyuncular'),), 'rewrite' => array('slug' => 'oyuncu', // This controls the base slug that will display before each term 'with_front' => false, // Don't display the category base before "/locations/" 'hierarchical' => false // This will allow URL's like "/locations/boston/cambridge/" ),)); register_taxonomy('yapim', 'post', array('hierarchical' => false, 'labels' => array('name' => _x('Yapım Yılı', 'taxonomy general name'), 'singular_name' => _x('Yapım Yılı', 'taxonomy singular name'), 'search_items' => ('Yapım Yılı ara'), 'all_items' => __('Tüm yıllar'), 'edit_item' => ('Yapım Yılı düzenle'), 'update_item' => ('Yapım Yılı güncelle'), 'add_new_item' => ('Yeni Yapım Yılı ekle'), 'new_item_name' => ('Yeni Yapım Yılı'), 'menu_name' => ('Yapım Yılı'),), 'rewrite' => array('slug' => 'yapim', // This controls the base slug that will display before each term 'with_front' => false, // Don't display the category base before "/locations/" 'hierarchical' => false // This will allow URL's like "/locations/boston/cambridge/" ),)); register_taxonomy('yonetmen', 'post', array('hierarchical' => false, 'labels' => array('name' => _x('Yönetmen', 'taxonomy general name'), 'singular_name' => _x('Yönetmen', 'taxonomy singular name'), 'search_items' => ('Yönetmen ara'), 'all_items' => ('Tüm yönetmenler'), 'edit_item' => ('Yönetmen düzenle'), 'update_item' => ('Yönetmen güncelle'), 'add_new_item' => ('Yeni yönetmen ekle'), 'new_item_name' => __('Yeni yönetmen adı'), 'menu_name' => ('Yönetmenler'),), 'rewrite' => array('slug' => 'yonetmen', // This controls the base slug that will display before each term 'with_front' => false, // Don't display the category base before "/locations/" 'hierarchical' => false // This will allow URL's like "/locations/boston/cambridge/" ),)); } add_action('init', 'add_custom_taxonomies', 0);

And My trying codes

    Dim trms = New Term() {New Term() With { _

.Taxonomy = "imdb", .Terms = TXTPUAN.Text.Trim.Split(",") }, New Term() With { .Taxonomy = "oyuncu", .Terms = TXTCATS.Text.Trim.Split(",") }, New Term() With { .Taxonomy = "yapim", .Terms = TXTYIL.Text.Trim.Split(",") }, New Term() With { .Taxonomy = "yonetmen", .Terms = TXTDIRECTOR.Text.Trim.Split(",") _ }}

post.Terms = trms

Help me please