wp_get_archives를 사용하여 내 맞춤 게시 유형 '다운로드'에 게시물이 게시 된 날짜의 월간 목록을 검색하고 있습니다.맞춤 게시 유형에 대한 wp_get_archives가 작동하지 않습니까?
하지만 작동하지 않습니다. 내가 뭘 잘못하고있는 걸까요?
나는 workpress 3.3
감사
CODE
<?php $args = array(
'post_type' => 'download',
'type' => 'monthly',
'show_count' => '1'
); ?>
<?php wp_get_archives($args); ?>
이것은 내가 참고로 내 사용자 지정 POST 유형 등록 방법 IS를 사용하고
// Downloads Post Type
add_action('init', 'create_post_type');
function create_post_type() {
$args = array(
'labels' => post_type_labels('Download'),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'has_archive' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => null,
'taxonomies' => array('group'),
'supports' => array('title',
'editor',
'author',
'thumbnail',
'excerpt',
'comments'
)
);
register_post_type('download', $args);
}
흠, 직접 해 보셨습니까? 나는이 기사에서 많은 querys와 쿼리를 시도했지만 많은 행운이 없다. – Joshc