나는 게시물을 만든 다음 내가 게시되었음을 나타내지 만 URL을 클릭하면 페이지를 찾을 수 없습니다!왜 Wordpress의 내 맞춤 게시물이 표시되지 않습니까?
add_action('init', 'offered_register');
function offered_register() {
$labels = array(
'name' => _x('Offered items'),
'singular_name' => _x('Item'),
'add_new' => _x('Give an item away'),
'add_new_item' => __('Give a new item away'),
'edit_item' => __('Edit item'),
'new_item' => __('Give Item Away'),
'view_item' => __('View Item'),
'search_items' => __('Search Offered Items'),
'not_found' => __('Nothing found'),
'not_found_in_trash' => __('Nothing found in Trash'),
'parent_item_colon' => ''
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'menu_icon' => get_stylesheet_directory_uri() . '/images/article16.png',
'rewrite' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => null,
'supports' => array('title','thumbnail', 'custom-fields','comments')
);
register_post_type('offered' , $args);
}
고맙습니다. 링크 유형을 기본값으로 변경 했으므로 작동했습니다. 나는 플러시 재 작성뿐만 아니라, 환호를 봐. – Nicola
내 플러그인의 경고 flush_rewrite_rules()가 결국 문제의 일부가되었습니다. 나는 permalinks를 수동으로 업데이트하는 것을 끝내었다. – myol