나는 워드 프레스에서 맞춤 카테고리 분류를 작성했습니다. 그리고 성공적으로 만들고 wordpress admin에 표시합니다.알 수없는 오류가 발생했습니다. 사용자 정의 분류/카테고리
문제 :
나는 새로운 카테고리를 추가하려고하지만 새로 만든 범주를 보여 먼저 페이지를 새로 고침 할 필요가있다.
카테고리를 삭제하면 해당 카테고리가
An unidentified error has occurred
이고 목록은 여전히 목록에 있습니다. 카테고리가 삭제되도록 페이지를 새로 고침해야합니다.
여기 내 코드
// hook into the init action and call create_schedule_taxonomies when it fires
add_action('init', 'create_schedule_taxonomies', 0);
// create two taxonomies, genres and writers for the post type "book"
function create_schedule_taxonomies() {
// Add new taxonomy, make it hierarchical (like categories)
$labels = array(
'name' => _x('Categories', 'taxonomy general name'),
'singular_name' => _x('Category', 'taxonomy singular name'),
'search_items' => __('Search Category'),
'all_items' => __('All Categories'),
'parent_item' => __('Parent Category'),
'parent_item_colon' => __('Parent Category:'),
'edit_item' => __('Edit Category'),
'update_item' => __('Update Category'),
'add_new_item' => __('Add New Category'),
'new_item_name' => __('New Category'),
'menu_name' => __('Categories'),
// more labels here...
);
$args = array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'show_in_rest' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => array('slug' => 'schedule_category'),
);
register_taxonomy('schedule_category', array('schedule'), $args);
}
의 우리가 어떻게 해결할 수 있습니까?
자바 스크립트 오류가있는 경우 브라우저 콘솔을 확인하십시오 –
콘솔 오류가 없습니다 – JSmith
열린 콘솔에서 오류 스크린 샷을 공유 할 수 있습니까? –