function format_wp_get_archives($link_html, $url, $text, $format, $before, $after)
$after = str_replace(' (', '', $after); // 括弧開きを削除
$after = str_replace(')', '', $after); // 括弧閉じを削除
if ($format === 'html') {
<li class="list-group-item d-flex justify-content-between align-items-start">
<div class="ms-2 me-auto">
<a href="' . $url . '" class="link-dark">' . $text . '</a>
<span class="badge bg-primary rounded-pill">' . $after . '</span>
add_filter('get_archives_link', 'format_wp_get_archives', 10, 6);