home > support > web design > wordpress plugin > hooks

Template Hooks

The plugin provides two hookable functions, if you are developing your own theme or extending the standard one the following hooks can be added to your templates:


tourcms_wp_book();

Outputs integration with the Booking Engine as configured in the Plugin settings. The user can choose whether the booking engine should load in the same page, a popup window or an iframe, or indeed turn off online booking functionality entirely.

Additionally the user can control the text that is displayed on the two link styles (the default is "Book Online", or a translation) plus the height and width for iframes/popups.

Alternatives to tourcms_wp_book();

The Tour-specific Booking Engine URL is stored in a meta tag so can be used directly if more flexibility is required, view booking instructions on how to link.

The booking engine is fully customisable within TourCMS and also supports additional querystring parameters for further tweaking.


tourcms_wp_price();

Outputs a span with the class "fromprice" containing the text "from" (or a translation) followed by the lead in price for the Tour/Hotel being viewed.

The lead in price is stored in a meta tag so can be used directly if more flexibility is required.