---
title: Channels
menu_group: Linear TV
menu_order: 15
tab: Linear TV
tab_order: 15
requires_linear_tv: true
summary: Create linear channels with timezone, fallback programming, schedule horizon, and EPG visibility.
---

# Channels

Create channels under **Channels → Add New Channel** (CPT `channels`).

## Channel settings (CMB2)

| Field | Meta key | Notes |
|-------|----------|-------|
| Channel Number | `_mediablaster_channel_number` | Optional display order for clients |
| Enabled | `_mediablaster_channel_enabled` | Off channels are excluded from public REST. CMB2 stores **`on`** when checked (not `1`). Public queries accept `on` and `1` via `MediaBlaster_Linear_Channel_Service::enabled_meta_query()`. |
| Show in Program Guide | `_mediablaster_channel_epg_visible` | Hide from multi-channel EPG when off. Also CMB2 **`on`**; use `epg_visible_meta_query()`. |
| Timezone | `_mediablaster_channel_timezone` | Channel metadata for clients/admin; schedule times and compiled airings are UTC |
| Fallback Playlist | `_mediablaster_channel_fallback_playlist_id` | Fills gaps between scheduled blocks (channel-level; not a per-block field) |
| Schedule Horizon (days) | `_mediablaster_channel_schedule_horizon_days` | 7–90; how far ahead the compiler generates airings (default 30) |
| Loop Fallback Playlist | `_mediablaster_channel_loop_fallback` | Repeat fallback items until the next block |

## Featured image

The featured image field is labeled **Channel Logo** in the editor.

## Fallback programming

When no schedule block covers a time range, the compiler can insert items from the **Fallback Playlist**. Enable **Loop Fallback Playlist** to repeat fallback content until the next explicit block starts.

Fallback only applies when a valid fallback playlist is selected and the channel is enabled.

## After saving

Saving channel settings marks the channel **dirty** for recompilation. Run **Generate Guide** on the [Channel Scheduler](channel-scheduler.md) page or wait for cron (`mediablaster_linear_compile_channel`).

## Admin shortcuts

From the Channels list table, use **Schedule** in row actions to open **Channel Schedule** with that channel pre-selected.

## REST

Published **Enabled** channels appear at `GET /wp-json/mediablaster/v3/channels`.

If the response is `{ "items": [], "total": 0, ... }` while channels exist in wp-admin:

1. Confirm each channel is **Published** (not Draft).
2. Confirm **Enabled** is checked on the Channel edit screen.
3. Confirm code uses `enabled_meta_query()` — querying only `'value' => '1'` misses CMB2’s `"on"` and returns an empty list even when Enabled is on.

Channel detail includes timezone and branding; connected apps use compiled airings from `/channels/{id}/now` and `/channels/{id}/schedule` (after **Generate Guide** or cron).

## Web player

Embed the current schedule on the Channel (or any Page) with:

```
[mediablaster_channel_player]
[mediablaster_channel_player id="3473"]
```

`[mediablaster_player]` on a Channel post is equivalent. Channel posts open in the block editor; insert **MediaBlaster Channel Player**. The player follows compiled airings (VOD offset or live edge) and refreshes when the program changes. Off-air Channels show an empty state until programming is available.

Do not add video URL meta to the Channel post. Playback always uses the scheduled content post.

## Web schedule

Show what is on now and coming up:

```
[mediablaster_channel_schedule]
[mediablaster_channel_schedule id="3473" range="24" layout="list"]
```

Omit `id` on a Channel post. On Pages, pass the Channel ID. Times default to the Channel time zone (`timezone="channel"`); use `site`, `viewer` (browser local time with JS), or an IANA zone. The guide highlights **Now Playing** and **Up Next**, shows progress from scheduled start/end (not media duration), and refreshes when the matching Channel Player changes airings (`mediablaster:channel-airing-change`).

Also available as the **MediaBlaster Channel Schedule** Gutenberg block and Elementor widget. All three use the same `MediaBlaster_Linear_Schedule_Display` renderer and the existing `/channels/{id}/schedule` REST data (schema unchanged).
