Template Override & Create Own Tour Template

Template Override & Create Own Tour Template – Tour Booking Manager

The tour booking manager plugin comes with awesome template override features. That means you can change/modify any design section or create your own template. In this documentation, you will learn both to Override any section & Create your own template. First:

Override Section:

If you want/need to change any section of any part of the template you can easily override the section by copying it to your theme folder. Suppose you want to change the content or you want to add any content into the sidebar location section. Then First you need to create a new folder into your currently active theme folder as:

 

ttbm_templates

Then create another folder into this as

 

single

So this folder will look like

 

ttbm_templates/single/

Then go to the tour-booking-manager plugin folder then go to templates/single and copy the file sidebar_location.php and paste it to the newly created theme folder. So the theme folder path will be

 

ttbm_templates/single/sidebar_location.php

Now, this file will load from the theme folder instead of the plugin folder. So if you add/change anything in this file it will not lose in the plugin update. You can also copy the full

 

templates

folder from the plugin and paste it to your theme folder and rename it as ttbm_templates So all the temple files will be load from the theme folder. It’s very easy and fun!

Create your own template:

The tour booking manager plugin comes with some pre-built templates. But you can create your own themes too! For creating your own theme go to the plugin folder and copy the templates folder and paste it into your theme folder, now rename it as ttbm_templates

Now go to the themes folder. You can see the list of pre-built themes. Now create a PHP file into the themes folder with any name you want. then open the file into an editor. now put the template/theme name

 

// Template Name: Dhaka

That’s it! you can now find this theme in the template list which you can find on the event page in the dashboard and the event settings page.

Available Filter & Hooks:

Tour Booking Manage plugin comes with a bunch of filter and hooks which you can use anywhere to display the values here is the list:

 

// For Display the Tour Title:

do_action( 'ttbm_the_title', $tour_id );


 
 
// For Display the Image Gallery:

do_action( 'ttbm_the_thumbnail_gallery', $tour_id );


 
 
// For Display the Tour Content:

do_action( 'ttbm_the_content', $tour_id );


 
 
// For Display the tour Ticket & Extra Service List:

do_action( 'ttbm_the_tickets_list', $tour_id);

do_action( 'ttbm_the_tickets_list', $tour_id, 'no-heading');


 
 
// For Display the tour day-wise details section:

do_action( 'ttbm_the_day_details', $tour_id );

do_action( 'ttbm_the_day_details_only', $tour_id );


 
 
// For Display the tour F.A.Q Section:

do_action( 'ttbm_the_faq', $tour_id );

do_action( 'ttbm_the_faq_only', $tour_id );


 
 
// For Display the tour Price:

do_action( 'ttbm_the_price', $tour_id );

do_action('ttbm_only_price',$tour_id);


 
 
// For Display the tour Available Seat stats:

do_action( 'ttbm_seats_info', $tour_id );

do_action( 'ttbm_only_seats_info', $tour_id );


 
 

// For Display the tour Location Information:

do_action( 'ttbm_loaction_info', $tour_id );

do_action( 'ttbm_only_loaction', $tour_id );


 
 

// For Display the tour price includes a service list:

do_action( 'ttbm_price_include', $tour_id );

do_action( 'ttbm_price_include_only', $tour_id );


 
 

// For Display the tour price excludes a service list

do_action( 'ttbm_price_exclude', $tour_id );

do_action( 'ttbm_price_exclude_only', $tour_id );


 
 

// For Display the HipHop tour place list

do_action( 'ttbm_hiphop_places', $tour_id );

do_action( 'ttbm_hiphop_places_only', $tour_id );


 
 

// For Display the tour google map:

do_action( 'ttbm_google_map', $tour_id );


 
 
// For Display the tour duration info:

do_action('ttbm_duration',$tour_id);


 
 
// For Display the tour maximum people allow information:

do_action('ttbm_max_people_allow',$tour_id);


 
 
// For Display the tour minimum age required information:

do_action('ttbm_min_age_allow',$tour_id);


 
 
// For Display the tour type information:

do_action('ttbm_type',$tour_id)