// ジャンル別の共通パーツをショートコードで呼び出す
function get_service_info($atts) {
    extract(shortcode_atts(array(
        'type' => 'video', // デフォルトは動画
        'id' => '',
    ), $atts));

    // ストックリスト（擬似データベース）
    // 本来的にはここをAPIやカスタムフィールドと連動させます
    $data = array(
        'video' => array(
            'dmm' => ['name' => 'DMM TV', 'price' => '550円', 'trial' => '30日間'],
            'danime' => ['name' => 'dアニメストア', 'price' => '660円', 'trial' => '31日間']
        ),
        'job' => array(
            'doda' => ['name' => 'doda', 'count' => '20万件', 'type' => '総合・エージェント'],
        )
    );

    $info = $data[$type][$id];

    if (!$info) return 'データが見つかりません';

    // 価格.com風のスペック表示
    return '<div class="spec-box"><strong>' . $info['name'] . '</strong>: ' . ($info['price'] ?? $info['count']) . '</div>';
}
add_shortcode('svc_info', 'get_service_info');