
= $init['meta'][$page_curent]['h1'] ?>
CATEGORY:= esc_html($term_name) ?>
記事がありません。
$v) $params[$k] = $v; $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); $qs = http_build_query($params); return $qs ? ($path . '?' . $qs) : $path; } /** 一覧クエリ(基本:コラム) */ $args = [ 'post_type' => $POST_TYPE, 'post_status' => 'publish', 'posts_per_page' => 10, 'paged' => $paged, ]; /** term絞り込み(コラムカテゴリー) */ if ($term_slug) { $args['tax_query'] = [ [ 'taxonomy' => $TAXONOMY, 'field' => 'slug', 'terms' => $term_slug, ] ]; } /** 月別絞り込み(ym=YYYY-MM) */ if ($ym && preg_match('/^\d{4}\-\d{2}$/', $ym)) { $args['date_query'] = [ [ 'year' => (int)substr($ym, 0, 4), 'month' => (int)substr($ym, 5, 2), ] ]; } $q = new WP_Query($args); /** サイドバー:カテゴリ(ターム一覧+件数) */ $terms = get_terms([ 'taxonomy' => $TAXONOMY, 'hide_empty' => true, ]); /** サイドバー:月別アーカイブ(column投稿のみで集計) */ global $wpdb; $posts_table = $wpdb->posts; $monthly_rows = $wpdb->get_results($wpdb->prepare(" SELECT DATE_FORMAT(post_date, '%%Y') AS y, DATE_FORMAT(post_date, '%%m') AS m, COUNT(ID) AS cnt FROM {$posts_table} WHERE post_type = %s AND post_status = 'publish' GROUP BY y, m ORDER BY y DESC, m DESC ", $POST_TYPE)); ?>

CATEGORY:= esc_html($term_name) ?>
記事がありません。