$cat_ID = 12; wp_get_cat_archives('type=monthly', $cat_ID); add_filter('getarchives_where', 'custom_archives_where', 10, 2); add_filter('getarchives_join', 'custom_archives_join', 10, 2); function custom_archives_join($x, $r) { global $wpdb; $cat_ID = $r['cat']; if (isset($cat_ID)) { return $x . " INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER