내 functions.php 파일에 다음을 추가했습니다.Wordpress 사용자 정의 게시물 유형 아카이브
register_post_type('news',
array(
'labels' => array(
'name' => __('News'),
'singular_name' => __('News'),
'add_new' => __('Add New Article'),
'add_new_item' => __('Add Article'),
'edit_item' => __('Edit Article'),
'new_item' => __('New Article'),
'view_item' => __('View Article'),
'search_items' => __('Search Articles'),
'not_found' => __('No Articles Found'),
'not_found_in_trash' => __('No Articles Found In Trash'),
'rewrite' => array(
'slug' => 'news',
'with_front' => false
),
'has_archive' => true,
),
'public' => true,
)
);
하지만 내 사이트 mysite/news /에 뉴스를 입력 할 때 has_archives 옵션을 사용하여 내 아카이브를 나열해야 할 때 페이지를 찾을 수 없습니다.
무엇이 잘못 되었나요?
그런데 archives.php 파일이 있습니다.
좋은 답변입니다. 지독한 퍼머 링크를 새로 고침 해주세요. – Xavier