Description
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. - Lead post type. Submitted requests are stored in the
wha_tours_leadpost type. WordPress limits a
post type name to 20 characters, so the name cannot carry the fullwha_tours_core_prefix;
wha_tours_lead is the prefixed short form and is registered private, with no public archive.
Resources
- CMB2 v2.13.0 — https://github.com/CMB2/CMB2 — GPL-2.0-or-later, bundled in
vendor/cmb2/cmb2,
unmodified, except that three groups of files it does not need here are left out of the package:
- The wp-color-picker-alpha files (
js/wp-color-picker-alpha.jsand
js/wp-color-picker-alpha.min.js). CMB2 only registers that script forcolorpickerfields, which
this plugin does not use, and the plugin additionally removes thewp-color-picker-alphahandle
through thecmb2_script_dependenciesfilter. - jQuery UI Timepicker Addon (
js/jquery-ui-timepicker-addon.min.js, v1.5.0), which CMB2 registers
asjquery-ui-datetimepickerfor thetext_timeandtext_datetime_timestampfield types. This
plugin only usestext_date, and the same filter removes that handle too. - CMB2’s own translation files (
languages/). They belong to thecmb2text domain, not to this
plugin, and WordPress loads them from translate.wordpress.org wherever CMB2 is installed as a
plugin of its own.
Demo content photographs, bundled in demo/images/ and imported by Tours Import demo content.
All of them come from Wikimedia Commons and are released under CC0 1.0 Universal (public domain
dedication), https://creativecommons.org/publicdomain/zero/1.0/. They were re-encoded as JPEG with
a long edge of at most 1280 pixels; the same list is repeated in demo/images/CREDITS.txt.
demo/images/beach-deckchair.jpg— File:Liegestuhl Strand Uwe (183891951).jpeg — https://commons.wikimedia.org/wiki/File:Liegestuhl_Strand_Uwe_(183891951).jpeg — Uwe Jelting — CC0 1.0demo/images/prague-castle.jpg— File:Prague Castle at Night viewed from Charles Bridge.jpg — https://commons.wikimedia.org/wiki/File:Prague_Castle_at_Night_viewed_from_Charles_Bridge.jpg — Lucas Garron — CC0 1.0demo/images/carpathians.jpg— File:Українські карпати.jpg — https://commons.wikimedia.org/wiki/File:%D0%A3%D0%BA%D1%80%D0%B0%D1%97%D0%BD%D1%81%D1%8C%D0%BA%D1%96_%D0%BA%D0%B0%D1%80%D0%BF%D0%B0%D1%82%D0%B8.jpg — Slaydoggy — CC0 1.0demo/images/lake-bled.jpg— File:Lake Bled, Slovenia (28439609952).jpg — https://commons.wikimedia.org/wiki/File:Lake_Bled,Slovenia(28439609952).jpg — Dimitry Anikin — CC0 1.0demo/images/eiffel-tower.jpg— File:Eiffel Tower, Paris 12 June 2023.jpg — https://commons.wikimedia.org/wiki/File:Eiffel_Tower,_Paris_12_June_2023.jpg — Pierre Blaché — CC0 1.0demo/images/budapest-chain-bridge.jpg— File:Széchenyi Chain Bridge in Budapest at night.jpg — https://commons.wikimedia.org/wiki/File:Sz%C3%A9chenyi_Chain_Bridge_in_Budapest_at_night.jpg — Wilfredor — CC0 1.0demo/images/synevyr-lake.jpg— File:Transkarpaten Ukraine Synevyr – 2.jpg — https://commons.wikimedia.org/wiki/File:Transkarpaten_Ukraine_Synevyr_-_2.jpg — Bikerjimi — CC0 1.0demo/images/danube-budapest.jpg— File:Danube, Budapest 20250628 160606.jpg — https://commons.wikimedia.org/wiki/File:Danube,_Budapest_20250628_160606.jpg — Vauia Rex — CC0 1.0demo/images/krakow-old-town.jpg— File:Horse carriages in Krakow Old Town Square.JPG — https://commons.wikimedia.org/wiki/File:Horse_carriages_in_Krakow_Old_Town_Square.JPG — Rudolph.A.Furtado — CC0 1.0demo/images/dresden.jpg— File:Dresden, Ernemannturm (Juni 2026) 4.jpg — https://commons.wikimedia.org/wiki/File:Dresden,Ernemannturm(Juni_2026)_4.jpg — Romzig — CC0 1.0demo/images/vienna.jpg— File:Statue Eugenio of Savoy Heldenplatz Vienna Austria.jpg — https://commons.wikimedia.org/wiki/File:Statue_Eugenio_of_Savoy_Heldenplatz_Vienna_Austria.jpg — Jebulon — CC0 1.0demo/images/kamianets-podilskyi-castle.jpg— File:Bridge to Kamyanets Podilsky Castle.jpg — https://commons.wikimedia.org/wiki/File:Bridge_to_Kamyanets_Podilsky_Castle.jpg — Brian Dell — CC0 1.0demo/images/bran-castle.jpg— File:Bran Castle – Castelul Bran.JPG — https://commons.wikimedia.org/wiki/File:Bran_Castle_-_Castelul_Bran.JPG — Calatorinlume — CC0 1.0demo/images/monaco.jpg— File:Spring time in Monte Carlo, Monaco (Unsplash).jpg — https://commons.wikimedia.org/wiki/File:Spring_time_in_Monte_Carlo,Monaco(Unsplash).jpg — Nick Karvounis — CC0 1.0
Blocks
This plugin provides 1 block.
- Lead form Request form: name, phone and comment. Submissions are emailed and stored in Leads.
Installation
- Upload the
wha-tours-corefolder to/wp-content/plugins/, or install the plugin through the Plugins screen. - Activate the plugin through the Plugins screen. The permalinks are refreshed automatically on activation.
- On a fresh site, go to Tours Import demo content to fill it with the sample catalogue, or run
wp wha-tours demo import. - Add tours under Tours, and place the Lead form block or the
[wha_tours_lead_form]shortcode on your contact page.
FAQ
-
Where do the submitted requests go?
-
Each request is emailed to the address in Settings General (filterable with
wha_tours_core_lead_recipient) and stored as a private entry under Tours Leads, visible to administrators only. -
Does uninstalling delete my tours?
-
No. Uninstalling removes only the options and transients created by the plugin. Tours, terms, tour meta and stored leads are kept.
-
What does the demo import change on a site that is already in use?
-
Nothing that exists. Every tour, term, page and image it creates is tagged with the
_wha_tours_core_demometa key and skipped on the next run. Menus are only created for theme locations that have no menu yet, Customizer settings are only written when the WHA Tour Poster theme is active and the setting is still empty, and the Reading settings are only changed while the front page still shows the latest posts. -
Which filters and actions are available?
-
wha_tours_core_get_tours_args filters the query arguments,
wha_tours_core_lead_recipientfilters the notification address andwha_tours_core_lead_submittedfires after a request was stored.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“WHA Tours Core” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “WHA Tours Core” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Initial release: Tour post type, tour taxonomies and meta, lead form shortcode and block, demo content importer.

