WHA Tours Core
WHA Tours Core keeps the content structure of a tour operator site in a plugin, so it survives a theme switch, as required by the WordPress.org theme guidelines. The plugin registers: The Tour post type (archive at /tours/ , single tours at /tour/<slug>/ ), with title, editor, excerpt, featured imag
WHA Tours Core keeps the content structure of a tour operator site in a plugin, so it survives a theme switch, as required by the WordPress.org theme guidelines.
The plugin registers:
- The Tour post type (archive at /tours/ , single tours at /tour/<slug>/ ), with title, editor, excerpt, featured image and revisions, available in the block editor and the REST API.
- Three taxonomies: Tour Categories (hierarchical), Seasons and Countries .
- Tour fields: days, transport, price, route stops, departure dates with availability status, and a “season hit” flag. The next departure date is computed automatically and used for sorting.
- Category fields: image, short description and a colour key. Seasons have a sort order.
- A demo content importer under Tours → Import demo content (and wp wha-tours demo import ), which fills a fresh site with a sample catalogue: four categories, four seasons, eleven countries, twelve tours with CC0 photographs, four pages, two menus, the Customizer settings of the WHA Tour Poster theme and the Reading settings. It never overwrites existing content and creates no duplicates when it is run twice.
- A lead form as the [wha_tours_lead_form] shortcode and as the Lead form block. Submissions are checked against a nonce, a honeypot field and a one-minute-per-IP rate limit, emailed to the site administrator and stored as private Leads entries in the admin.
Template helpers for theme authors: wha_tours_core_get_meta() , wha_tours_core_get_tours() , wha_tours_core_get_term_image_id() , wha_tours_core_next_date() , wha_tours_core_format_dates() , wha_tours_core_transport_label() , wha_tours_core_transport_icon() , wha_tours_core_category_color() and wha_tours_core_price_label() .
Developer notes
- Meta key prefix. All tour and term meta registered by the plugin uses the _wha_tour_ prefix ( _wha_tour_days , _wha_tour_transport , _wha_tour_price , _wha_tour_route , _wha_tour_dates, _wha_tour_hit , _wha_tour_next_departure , _wha_tour_image , _wha_tour_image_id, _wha_tour_short_desc, _wha_tour_color , _wha_tour_order ). That prefix is shared with the WHA Tour Poster theme, which reads the same keys directly when it renders poster cards and season tabs, so renaming a key here breaks the theme templates. The lead entries use _wha_tours_core_lead_* instead, because nothing outside this plugin reads them.