Easy Online Booking

Template Structure

Easy Online Booking template files contain the markup and template structure for frontend and HTML emails of your store.

When you open these files, you will notice they all contain hooks that allow you to add/move content without needing to edit template files themselves. This method protects against upgrade issues, as the template files can be left completely untouched.

Template files can be found within the /easy-online-booking/templates/ directory.

You can edit these files in an upgrade-safe way using overrides. Copy it into a directory within your theme named /easy-online-booking keeping the same file structure but removing the /templates/ subdirectory.

Example 1: To overwrite archive page of book items:

// Copy File: 
- wp-content/plugins/easy-online-booking/templates/archive-bookitem.php

// To Theme
- wp-content/theme/yourtheme/easy-online-booking/archive-bookitem.php

// OR Child Theme
- wp-content/theme/your-child-theme/easy-online-booking/archive-bookitem.php

Example 2: To overwrite title of single book items:

// Copy File: 
- wp-content/plugins/easy-online-booking/templates/single-bookitem/title.php

// To Theme
- wp-content/theme/yourtheme/easy-online-booking/single-bookitem/title.php

// OR Child Theme
- wp-content/theme/your-child-theme/easy-online-booking/single-bookitem/title.php

Do not edit these files within the core plugin itself as they are overwritten during the upgrade process and any customizations will be lost.

Third Party Theme Compability

For the most part, Easy Online Booking templates will integrate nicely with most WordPress defaults themes.

Where you may run into issues when the default Easy Online Booking content wrappers do not match your chosen theme. This manifests itself by breaking your layout on Easy Online Booking pages and shifting your sidebars into the bottom or incorrect positions.

You can resolve it using plugin hooks, this is more flexible and easy method. Insert a few lines in your theme's or child theme's functions.php file.

// First unhook the default content wrappers:
remove_action( 'wpeob_before_main_content', 'wpeob_output_content_wrapper', 10 );
remove_action( 'wpeob_after_main_content', 'wpeob_output_content_wrapper_end', 10 );

// Then hook in your own functions to display the wrappers your theme requires:
add_action('wpeob_before_main_content', 'my_theme_wrapper_start', 10);
add_action('wpeob_after_main_content', 'my_theme_wrapper_end', 10);

function my_theme_wrapper_start() {
  echo '<section id="main">';
}

function my_theme_wrapper_end() {
  echo '</section>';
}

Make sure that the markup matches that of your theme. If you’re unsure of which classes or IDs to use, take a look at your theme’s page.php for guidance.


Need Support
 
Created: December 12, 2017
By: NetWorld Technology
Email: support@visitnetworld.com
If you have any questions that are beyond the scope of this help file, please feel free to email me on support@visitnetworld.com . Thanks so much!