add_filter( \'getarchives_join\' , \'getarchives_join_filter\');
function getarchives_join_filter( $join ) {
global $wpdb;
return $join . " INNER JOIN {$wpdb->term_relationships} tr ON ($wpdb->posts.ID = tr.object_id) INNER JOIN {$wpdb->term_taxonomy} tt ON (tr.term_taxonomy_id = tt.term_taxonomy_id)";
}
add_filter( \'getarchives_where\' , \'getarchives_where_filter\');
function getarchives_where_filter( $where ) {
global $wpdb;
return $where . " AND tt.taxonomy = \'category\' AND tt.term_id=\'blog category id\' ";
}
用您的博客类别id更改“博客类别id”。