# TourOperator Theme Documentation

Online Documentation - The up to date documentation

### Table of contents:

- 1. Hosting Requirements
- 2. How to disable comments on posts/pages.
- 3. Theme Installation Instructions
- 4. How To Add and Manage Items
- 5. How To Setup Homepage and Search Form
- 6. How to set up Item Offers
- 7. How to set up paypal account and manage users
- 8. EasyAdmin for registered users
- 9. Creating Custom Menus
- 10. How to Use Revolution Slider
- 11. Header / Slider options
- 12. Setting Up Portfolio
- 13. Setting Up Contact Form
- 14. How to edit Custom Type
- 15. Advanced users: Editing HTML files

## 1. Hosting Requirements

We always test our theme on most standard hosting set ups, however make sure your hosting match the following requirements:

- PHP5 version
- PHP5 GD library installed
- Notices & Warnings are turned off
- We also recommend mod_rewrite enabled
- Memory limit set up at least 64MB
- upload_max_filesize at least 10MB
- Please also check that you have permissions to write to theme folder

## 2. How to disable comments on posts/pages.

You can enable or disable "Leave a reply" box directly in the settings of your posts while you edit them, or disable comments globally in wordpress settings.

Example of "Leave a reply/comment" box:

### 1. Disable comments in default Wordpress settings

Go to options: "Settings > Discussions" and click Allow people to post comments on new articles.
This option turn off possibility to add new comments for new posts created after this change.
To remove/disable existing comments from pages/posts, follow please step 2:

### 2. Disable comments on separated pages

Go to edit page of post or page, it is possible that settings for Discussion are hide, so open Screen Options in the top right corner of page as you can see on next image, and check Discussion checkbox:

Then you will be able to disable/enable comments in the settings of this page:

To do not need repeat this for each page/post separately, you can select pages where you want disable comments in the list of all your pages, follow please images:

Select pages and choose Edit option, click Apply button.

On the next screen select for Comments option: Do not allow.

After this you may notice text "Comments are closed." on pages where were comments before.
This message you can simply hide with custom css, just paste in AIT Appearance > Custom CSS section this code:
`.nocomments { display: none !important; }`

## 3. Theme Installation Instructions

### Installation Screencast

Whole installation process in covered in the following video tutorial.

### Theme Installation

Theme should be installed standard way via wordpress admin panel.

1. Please navigate to "Appearance -> Themes -> Install Themes"
2. Click on Upload
3. Select your theme from WP folder that is included in the Zip file you purchased.
4. Click Install Now
5. After the theme is successfully installed, click Activate

[notification type="attention"]To import correctly media for default content, uncheck please in Settings > Media option: Organize my uploads into month- and year-based folders. Media for default content should be directly in Uploads folder.[/notification]

### Importing Default Content

For faster site development we recommend you to import default content. Default content shows you all page layouts, shortcodes and other post types. If youd like to import it, you can do it via Tools -> Import -> WordPress -> Upload file and import. Please select a file called defaultcontent-export.xml and and simply click Upload file and import. We recommend you installing Contact Form 7? plugin before running import. Itll import you also contact form examples.

NOTE: for importing content use this plugin WordPress Importer.

### Setting Up Homepage and Blog

Please note that you have to select a homepage and posts page for our theme to work properly.

1. If you havent uploaded our default content, please create a new page. You can of also edit the existing homepage we provided in default content.

2. Select Homepage Template" layout for the page that should become your homepage. Please note if there is no "Template" option available or dropdown does not include Homepage template, you don't need to set it up.

3. Navigate to: Admin -> Settings -> Reading and set a static Front page & Posts page:

## 4. How To Add and Manage Items

All items which you would like to add into the map you need to set up in admin in section "Items".

You can categorize your items to various "Types", "Destinations" and "Amenities". Then click on "add new" and fill the description of Item.

- Name of new item,
- Description of item,
- Choose tour types,
- Choose tour destinations,
- Choose tour amenities,
- Add featured image,
- Add address,
- Add position of item by clicking on the map,
- Add exact GPS position of item,
- Show "Street View" instead of position on the map,
- Add pictures to gallery
- Add some content to tabs

(12) You can set up exact street view in admin which you would like to get showed on the page. After you select show street view you will get "street view" map / picture in slider place.

### Google Maps API limits

There is no issue using Google Maps on directory sites unless number of map loads is not higher than 25000 a day. If number of calls to Google is higher, you need to purchase Google maps for Business license. Please check the following url for more details.

## 5. How To Setup Homepage and Search Form

TourOperator Wordpress Theme allows you to add some featured items from specific category or category listing to the content of page or homepage:

You can add these boxes via two shortcodes and specify category with slug parameter

- [ait_tour_top slug="top-destinations" title="Top Destinations"]
- [ait_tour_list slug="all-inclusive-deals" count="4"]

Search form allow users to filter items and item offers with specific criteria. Search form can be located in map (1) or in sidebar as widget (2).

You'll get only items on the map and list which requires your criteria. As an example I used type "Cruise Deals" and offers with max price $ 50.

## 6. How to set up Item Offers

In TourOperator Wordpress theme users can booking to offers which represents some available dates for item.

All item offers which you would like to add into the map you need to set up in admin in section Item Offers

You need to specify item and choose date, price and capacity.

If you want to recieve email when user reserve some offer, then you need to check "Send email to admin when user send reservation" checkbox in General Settings -> Reservations.

## 7. How to set up paypal account and manage users

TourOperator Wordpress Theme includes "registration form" for visitors which can register to your portal and pay for account via PayPal. Registered users can register to your portal and add their own Items, manage Items Offers, Reservations and Ratings.

## PayPal Account

First step before setting up PayPal account in admin section "settings" is selecting that "anyone can register" and "new user default role" is Subscriber.

You can connect Your PayPal account with TourOperator WP Theme in Admin. In "AIT Dashboard" go to "General Settings" and choose Accounts from the menu.

In section PayPal System you need to set up all the information about your PayPal account as (API Enviroment, API Username, Currency etc.)

[notification type="attention"]Check this tutorial: how to get PayPal API info[/notification]

[notification type="attention"]Don't forget to select Enable PayPal system to buy packages (accounts) in PayPal System section !!! If you don't select Enable, visitors will register and add items for free!!![/notification]

In section PayPal API Enviroment you can choose two options:

- Virtual Enviroment for testing - for more info check developer.paypal.com
- Live (Real) Enviroment

Below you can set up different types of accounts with variety of number of items and prices, expiration date and account capabilities.

## Managing Users

In section "Users" you can check and manage all your registered users. They have determine roles according the type of account they paid for. *You (as Admin) can manually add people into the list of users as well and give them any role.

## Registration of Users

Visitors can register to your portal through the registration form on any page where you can add Shortcode or Widget with registration form. After adding the username, email and clicking on "Sign Up" or "Buy with PayPal" for payed Accounts, they are automatically linked to the PayPal where they can pay for the service (account).

After registration they receive email: username, password and log in link to your portal. They can log in but they are not allow to submit the items until they pay for the account.

Registration Forms:

- Shortcode: [directory_register] - you can paste this shortcode to any page directly into content
- Widget: in Appearance > Widgets options just drag and drop "Theme - TourOperator Login" widget into the sidebar area

## Registered users Login and Adding of their Items

After successful registration user may login to your portal via login form in the same widget which is used for registration.

After login and payment users can add their own Items through Wordpress admin styled in theme design!
Check out documentation page of our great EasyAdmin for more information bout Items managing from user side.

## 8. EasyAdmin for registered users

EasyAdmin is feature which allows registered users add their own Items to your portal through styled wordpress admin.

After login they are moved to screen with all their Items, and they can manage from here Item Offers, Reservations, Ratings of Items and their Account too.
Header and footer of this Admin page is the similar like on your portal, in theme admin settings you can set up logo for EasyAdmin as well.

Below list with Items is available button "Add new Item". After click on title of Item user may edit item like on image below:

## Manage Item Offers

Registered user may create and manage yourself own Item Offers and assign them for his Items.

## Manage Reservations

Via Reservation menu item users can manage all received Reservations.

## Manage Ratings

All received Ratings user can manage via Ratings menu item.

## Update of users account

If users want to upgrade account they can do it in section "directory account". They can upgrade account there if they haven't paid yet. In case of updating for better account you pay only difference of the price.

Users can check number of days before account expiration as well!

## 9. Creating Custom Menus

1. Navigate to: Appearance Menus

2. Now you can choose any items like pages, categories or custom links from the left column them to add to Main menu or Footer menu.

After you have added in your items, you can use drag and drop to order individual items. You can also click each item to reveal additional configuration options.

When you have finished building your custom menu, make sure you click the Save Menu button.

3. Its also important to define which menu will become your Primary menu and which one will be a Footer menu. This can be set in Theme Locations box on the left hand side.

## 10. How to Use Revolution Slider

Revolution Slider comes with these features:

- Unlimited Slides
- Unlimited Caption Layers
- CSS Animation with a fallBack to jQuery
- Vimeo & YouTube video
- Drag and Drop layering

First step is to go to Revolution Slider Plugin and click on create new Slider.

There you can set and edit basic settings about slider like slide transitions, slide change speed, shadowing, responsivity, slide navigation etc.

Required are Slider Name and Slider Alias:

Then click on Create Slider and add sliders backgrounds from your gallery :)

After that go to edit slides where you can set up everything what you would like to add to your slides.

On the top (6) you have some basic settings (transition, slot amount, rotation, delay etc.). In section Slide Image and Layers (7) you can add (delete) new layers (text, image, video) (8) and they starting to sort continually with adding in section Layers Sorting (9). Just drag and reorder (10) them how you wish :)

All layers you can simply drag (11) and drop exactly where you want them on slide picture.

In layer params (12) you can set / edit text, video, pics, animations, position and css file ( (13) as well.

For more information follow original documentation of Revolution Slider.

## 11. Header / Slider options

TourOperator WP Theme contains 4 different types of header (slider):

- Revolution Slider
- Google Map (with items)
- Single Image
- Nothing

When you go to page you have 4 options there:

## 12. Setting Up Portfolio

Theme provides powerful custom built Portfolio. You can use it to display various item types like images, videos or websites. You can simply add in new items to portfolio by click on Portfolios -> Add new Item from WP-Admin and then manage all items exactly like standard wordpress posts or pages.

Portfolio items can stored into unlimited number of Portfolio Categories. You can then select which portfolio youd like to include on a specific page or post. To manage portfolio categories please navigate to Portfolio -> Portfolio Categories from WP-Admin.

When you have created your portfolio items and assigned them to the categories, you can simply use shortcode to show your portfolio on any page or post. Portfolio shortcodes icon is available in your visual editor.
You can find also some examples of portfolio shortcodes in our preview sites of themes.

## 13. Setting Up Contact Form

For contact form we use a free wodpress plugin called Contact Form 7. More info about this plugin can be found on the following url: http://contactform7.com/

To install this plugin go to Plugins > Add new and type into search bar Contact Form 7. Find the plugin and click to Install Now.

Then click Activate Plugin. A new menu section will be created at the left hand side. Itll be calledContact.

If you want to have the same contact form like we have at our demo site, you can also install Really Simple CAPTCHA plugin. Code that we use on our demo site is as follows. Please insert it into Form box in Contact settings page:

    <p>

    <label for="your-name">Name <span>*</span></label>[text* your-name]

    </p>
    <p>

    <label for="your-email">Email <span>*</span></label>[email* your-email]

    </p>
    <p>

    <label for="your-subject">Subject</label>[text your-subject]

    </p>
    <p>

    <label for="your-message">Message</label>[textarea your-message]

    </p>
    <p class="selectbox">

    <label for="slect-os">Your OS</label>[select slect-os " " "Windows XP" "Windows 7" "Apple" "Linux"]

    </p>
    <p class="checkbox">

    [checkbox* agreement use_label_element exclusive "I agree with the terms of use of this Contact Form"]

    </p>
    <p class="radiobuts-horizontal">

    <span class="label">Do you need Support ?</span>[radio radiobuts use_label_element "Yes" "No" "Nobody Knows"]

    </p>
    <p class="radiobuts-vertical">

    <span class="label">Do you need Support ?</span>[radio radio-vertical use_label_element "Yes Vertical" "No Vertical" "Nobody Knows Vertical"]

    </p>
    <p class="captcha">

    [captchac captcha-1] [captchar captcha-1]

    </p>
    <p>[submit "Send Message"]</p>

Once you have your contact form created, you can insert into to any of you pages with a simplecontact-form shortcode:

## 14. How to edit Custom Type

## (example for WP Directory Item type)

Following tutorial shows how to add few simple fields into your Item custom type in Directory theme (basically steps to edit other custom types in other themes are very similar...).

Adding additional information for some custom type require:
1. Modify backend where you can store information for custom type.
2. Modify frontend codes to show these new information on your site.

## 1. Modify backend - settings of custom type

In our themes structure of settings in admin area is saved in files with extension *.neon
Neon files you can find in theme folder ./wp-content/themes/themeName/config - there are files with settings structures as AIT General Settings and AIT Appearance (these settings are in file theme-config.neon)
Neon files for custom types are in folders of each custom type: ./wp-content/themes/themeName/AIT/Framework/CustomTypes/folderOfCustomType

For example for custom type Item in Directory theme, is structure of settings in file ./wp-content/themes/directory/AIT/Framework/CustomTypes/dir-item/dir-item.neon

Following image shows how the structure looks. For example Opening Hours in Item custom type:

Let's try add some additional information for this Item custom type, for example some information about contact person for this Item.
We'll create new section with name Contact Person, and for each Item we will be able store information:
1. contact person name
2. contact person phone
3. some additional information for this contact person.

Following structure of Opening Hours section, we can create something like that:

    "Contact Person" : section

    contactPersonName:

    	label: Name

    	type: text

    contactPersonPhone:

    	label: Phone

    	type: text

    contactPersonInfo:

    	label: Additional Info

    	type: textarea

Following image shows what is the result of these few lines:

Now we can store for each Item custom type new information.
We'll need now edit frontend code to show new information on site.

## 2. Modify frontend - show information on site

Template files with main html codes for site are in folder "Templates" (./wp-content/themes/themeName/Templates).
In this example we want show new information on the single page of Item custom type - for this page is used file ./wp-content/themes/directory/Templates/single-ait-dir-item.php

Following image shows which code represent section with Opening Hours.

We are using Nette framework in our themes, more information about Nette Framework here: http://doc.nette.org/en/

Opening Hours are inside "if" condition to do not show items which are not filled for current Item custom type.

Similar we can show new section with Contact Person information for example below Opening Hours:

And this is result of changes above:

## 15. Advanced users: Editing HTML files

If you are an advanced user and would like to edit HTML directly, please be advised that we use a MVC architecture that allowed us to completely separate HTML content from standard WordPress PHP files.

- HTML templates can be found in folder ./Templates
- CSS is in file style.less.css, please note that style.css is generate dynamically and all your changes will be therefore deleted

You can read more about our templating engine WpLatte on the following url.

- www.AitThemes.com
- Top