A technical reference to how TuneSera stores stations and locations in WordPress, for developers building custom templates, queries or integrations.
Post type#
| Name | Slug | Notes |
|---|---|---|
| Stations | tunesera_station | Public, shown in the REST API. Supports title, editor (description), thumbnail (logo), excerpt and custom fields. |
Taxonomies#
| Taxonomy | Slug | Notes |
|---|---|---|
| Countries | tunesera_country | Hierarchical. Divisions (states/provinces) are child terms of their country. |
| Cities | tunesera_city | Cities, linked to their country or division. |
| Genres | tunesera_genre | Non-hierarchical, like tags. |
Regions (Africa, Asia, Europe and so on) are predefined groupings, not a taxonomy.
Station meta keys#
All station fields are stored as post meta with the prefix _tunesera_:
_tunesera_stream_url
_tunesera_logo_url
_tunesera_tagline
_tunesera_source_station_id
_tunesera_country_code
_tunesera_state_province_division
_tunesera_timezone
_tunesera_broadcast_type
_tunesera_frequency
_tunesera_language
_tunesera_website_url
_tunesera_facebook
_tunesera_x_twitter
_tunesera_instagram
_tunesera_youtube
_tunesera_tiktok_url
_tunesera_wikipedia
_tunesera_telegram
_tunesera_whatsapp
_tunesera_whatsapp_number
_tunesera_address
_tunesera_phone
_tunesera_email
_tunesera_additional_contact_info
_tunesera_bitrate
_tunesera_codec
_tunesera_listeners
_tunesera_rating
_tunesera_review_count
_tunesera_latitude
_tunesera_longitude
_tunesera_active_status
_tunesera_now_playing
_tunesera_last_synced_atTuneSera Pro adds _tunesera_featured (1 when a station is featured).
Example query#
$stations = new WP_Query( array(
'post_type' => 'tunesera_station',
'posts_per_page' => 10,
'tax_query' => array( array(
'taxonomy' => 'tunesera_genre',
'field' => 'slug',
'terms' => 'jazz',
) ),
) );
while ( $stations->have_posts() ) {
$stations->the_post();
$stream = get_post_meta( get_the_ID(), '_tunesera_stream_url', true );
}Meta keys starting with an underscore are hidden from the WordPress custom fields box. Edit stations through the station editor rather than changing meta directly, so validation and caches stay in sync.
Related articles#
Was this article helpful?