2013-12-06 3 views
0

У меня странные ошибки, что происходит каждый раз, когда я создаю новую категорию в пользовательский тип записи:Wordpress Custom Taxonomy неопределенная ошибка?

enter image description here

Я также получаю сообщение об ошибке при попытке удалить категорию: Произошла неизвестная ошибка.

Я пробовал wp в режиме отладки, но ничего лишнего не добавляется.

Надежда кто-то может помочь :)

Вот мой таксономия код:

function store_categories() { 

$labels = array(
    'name'    => _x('Store Categories', 'taxonomy general name'), 
    'singular_name'  => _x('Store Category', 'taxonomy singular name'), 
    'search_items'  => __('Search Store Categories'), 
    'all_items'   => __('All Store Categories'), 
    'parent_item'  => __('Parent Store Category'), 
    'parent_item_colon' => __('Parent Store Category:'), 
    'edit_item'   => __('Edit Store Category'), 
    'update_item'  => __('Update Store Category'), 
    'add_new_item'  => __('Add New Store Category'), 
    'new_item_name'  => __('New Store Category'), 
    'menu_name'   => __('Store Categories'), 
); 

$args = array(
    'labels'  => $labels, 
    'hierarchical' => true, 
    'query_var'  => true, 
    'rewrite'  => true, 
    'public'  => true, 
    'show_ui'  => true, 
); 

register_taxonomy('store-category', 'stores', $args); 

} 

add_action('init', 'store_categories', 0); 

И пользовательский код пост Тип:

function custom_store_post_type() { 

$labels = array(
    'name'    => _x('Custom Stores', 'post type general name'), 
    'singular_name'  => _x('Custom Store', 'post type singular name'), 
    'add_new'   => _x('Add New', 'Custom Store'), 
    'add_new_item'  => __('Add New Custom Store'), 
    'edit_item'   => __('Edit Custom Store'), 
    'new_item'   => __('New Custom Store'), 
    'all_items'   => __('All Custom Stores'), 
    'view_item'   => __('View Success Story'), 
    'search_items'  => __('Search Custom Stores'), 
    'not_found'   => __('No Custom Stores found'), 
    'not_found_in_trash' => __('No Custom Stores found in the Trash'), 
    'parent_item_colon' => '', 
    'menu_name'   => 'Custom Stores' 
); 

$args = array(
    'labels'  => $labels, 
    'description' => 'Holds our Custom Stores and Custom Store specific data', 
    'public'  => true, 
    'menu_position' => 20, 
    'supports'  => array('title', 'editor', 'thumbnail', 'page-attributes', 'excerpt'), 
    'has_archive' => true, 

); 

register_post_type('stores', $args); 

} 

add_action('init', 'custom_store_post_type'); 

ответ

0

Проблема решена.

Был закрыт тег php, который вызывал проблему в деталях плагина.

Смежные вопросы