Travelpayouts Wordpress Plugin

Plugin Description

Travelpayouts plugin will power up your blog with the following features:

  • Informative widgets (Hotels Map, Flights Map, Popular Routes and other);
  • Tables with handy information on flights and hotels (most favorable destinations from a particular city and with a particular airline, low prices calendar, popular airline destinations and much more);
  • Flights and hotels search form.

We have tried to simplify the installation of widgets, tables, and search forms when developing the plugin. This step-by-step manual provides detailed instructions on how to setup the Travelpayouts plugin.

Technical requirements

For correct work the plugin requires PHP version 5.3 or higher. And we recommended to use the current version of Wordpress. It is important for the correct work of the plugin, in terms of security and on the speed of your site.

By the way, Wordpress strongly recommends using of the latest versions of PHP and MySQL.

Advice №1: to know a version of PHP you have two ways - install a special plug-in or write a letter to support of your hosting.

Consider both of ways. Install and activate the plugin Display PHP Version, after the installation the version of PHP is displayed on the first page of the admin on your blog:

The second way - write a letter to the support of hosting:

"Hello. Can you please tell me what version of PHP installed on the host for site www.YourSiteName.com."

If you find that version of PHP below of 5.3 you should write a letter to the support of hosting:

"Hello. Please update the version of PHP to the 5.4 on the host for site www.YourSiteName.com."

Advice №2: In the letter you can also ask to set the memory limit is 128 MB or 256 MB.

Hosting provider can refuse, but if your request will be accepted it will be useful to your site (in case, that your limit was less before).

Plugin Installation

The Travelpayouts plugin is installed as regular WP plugin:

  1. Go to your WordPress Administration Panels and click on Plugins > Add New.
  2. Upload the Travelpayouts Plugin or search it in the Plugin Directory by typing “Travelpayouts”.
  3. Activate Plugin after installation.

Once the Plugin is activated, it is necessary to configure it by entering your Affiliate Marker and Token. We won’t be able to track clicks made in your widgets and tables if you ignore this step. Follow to the next section to get more detailed information regarding this issue.

The Plugin will remind of itself by sending a special alert message:

Basic Plugin Settings

To configure the plugin, press the Set details and enable plugin features. Page opens with a form to enter the partner token and marker.

If you are registered in the Travelpayouts affiliate program, follow the instructions below. If you don't have an account in the affiliate program, click New to Travelpayouts? On the next page you can see a brief guide of registration.

After registration you should return to the configuration page and fill Your API token and Your partner marker.

The values of the token and marker are located in the personal account in the Developers:

 

Additional Marker is an optional field with “Wpplugin” value set as default. This marker allows to track all the bookings that were made via Plugin. Get more detailed information about Additional Marker here.

White Label field is optional. You have to configure White Label option and enter its address in this field in case you want your visitors to browse search results on your website subdomain without redirecting them to our service. White Label address example: “http://whitelabel.travelpayouts.com”.

Additional Plugin Settings

You can start using Travelpayouts Plugin right after you enter your Affiliate Token and Marker. To configure Additional Plugin Settings go to Settings > Settings.

Attention! After the Plugin installation all Additional Settings will be set to default. Changing them is optional.

  • Error Message – Please, enter the text message to be displayed if a server connection error occurs.
  • Action after click
    • Show Search Form – a visitor will be redirected to a page on our website that includes a completed search form. In this case a Search button should be pressed to see the search results.
    • Show Search Results - a visitor will instantly be redirected to the search results page that features available hotel and flight bookings, according to information specified in the widget/table.
  • Distance Units – available options:
    • KM - kilometers;
    • M - miles (for U.S. audience).
  • Airlines Logo Size (px) – supported image size: from.. to...
  • Redirect – 301 Redirect will be activated.
  • Open in a New Window – a link will be opened in a new window.
  • Add Nofollow Attribute – all links will have a nofollow attribute set as default.
  • Cache Timeout – time the data is stored in the databapressingse. Cached data is loaded faster.
    • Day;
    • Hour.
  • Include Script – a place to include the script of the plugin.
    • Header – website header. The script will be loaded first, before website content.
    • Footer – The script will be loaded after all website content gets loaded. Widgets and tables can be loaded with delay in this case.
  • Date Format – all Wordpress standard date formats are supported.
  • Settings Import – import of previously exported settings.
  • Export – export of current settings to a file.

Localization

To change the language of widgets and tables go to Settings > Localization.

  • Widgets and Tables Language – Russian and English are supported for both table and widget tools.
  • Currency – currency to display the hotel and flight booking price in (RUB, USD, EUR).
  • Field Names – allows changing the field names in the tables.

 

Table Settings

You can start using Tables in your posts right after the plugin installation. In case you need to customize the Tables properties go to Flight Tickets section.

You can customize each table’s content in the Tables Content tab and set global table styles in the Layout tab.

Tables Content

To customize a certain table, click on its name in the list. An appropriate block with table settings will open.

Tables properties:

  • Additional Marker – specify a marker to track clicks on the links in a table. This field has a default value allowing you to accurately determine the table that generates you income.
  • Destination – city of arrival.
  • Button Text – text to be displayed on the button in the table. Price variable can be used to add the price to the button text.
  • Limit – max number of strings to display.
  • Number of stops – the choice of the allowable number of stops (all - displays all variants).
  • Origin – city of departure.
  • Paginate – add switches to the continuation of the list of data under the table.
  • Rows per Page – set the number of rows to be shown in a table. In case the number of table entries exceeds the specified rows number, pagination will be applied (you should put the Paginate checkbox).
  • Table Columns – add, remove, and change the order of columns in the table. Please note that sorting by first column is set as default.
  • Title – Table Title. Use the Airline variable in order to automatically put the airline name into the Table title. Origin and Destination variables can also be used to automatically set the city of departure and the city of arrival, respectively. You will be able to change the Table title when placing it in the post.
  • Title Tag - html tag for the table Title. This may be standard header tag h1, h2, h3, h4 or div tag.

Layout 

To configure the design of table, go to the Layout.

In the settings you can change:

  • header style;
  • content;
  • borders;
  • background;
  • table header background;
  • table header font;
  • show data as hyperlinks - when you click on the data cell the search page will open;
  • enable Horizontal Scroll - the tables' width won't be 100% of your content zone. When you resize your content zone (e.g. you have a responsible WP theme) - tables won't affect your design, but will have a horizontal scroll.

Widget Settings

You can start using Widgets in your posts right after the plugin installation. In case you need to customize the Widget properties go to Widgets section.

Widgets properties:

  • Help link:
    • Widget Example - hover to see a preview of the widget;
    • Travepayouts Help - a reference to the article on this widget in our knowledge repository.
  • Number of Widgets – number of widgets on a single page.
  • One Way – check to display One Way flights only.
  • Draggable – check to make the map
  • Select Color – map style customization.
  • Additional Marker – use Additional Marker to track clicks in a widget.
  • Destination – specify the city of arrival.
  • Disable Zoom – applies maximum map zoom limit.
  • Origin – specify the city of departure.
  • Period – specify the vacation period.
  • Size (px) – widget size.
  • Pin Size – specify map pin size in pixels.
  • Responsive – some of our widgets are responsive. They will automatically fit to the page size.
  • Hide Logo – check to remove Aviasales Logo from the widget.
  • Direct Flights Only – check to display flights with no stops only.
  • Scroll Wheel Zoom – check to enable mouse scroll zoom on embedded map.
  • Width (px) – widget width.

Search Forms

The plugin allows adding the flight and hotel search form on your blog pages.

Go to Search Forms section of your Dashboard and add a new Search Form. Get more detailed information about Search Form customization here.

After adding the search form, uncheck the Short code and Iframe code boxes and copy the search form code. Then return to the Travelpayouts Plugin and go to Search Forms.

Click the Add a Shortcode button. You will be taken to a new page for search form Shortcode generation.

Enter the Shortcode name and insert the previously copied search form code into the TravelPayouts Form Code text area.

Attention! You can specify the city of Departure and the city of Arrival in any of three different ways:

  1. When adding a Shortcode to the website page.
  2. When adding a Shortcode in the Search Forms section of the Travelpayouts plugin.
  3. When adding a Search Form in your Dashboard.

The above list is sorted in order of priority, i.e. the city of departure and the city of arrival specified when adding a Shortcode to the website page, will have a higher priority than the other two options.

Placing Widgets, Tables, and Search Forms

Use the Travelpayouts plugin menu, which is located above the WP Text Editor, to insert Widget, Table, or Search Form into your website’s page or post:

A modal window will open upon adding a Table or Widget, allowing you to select the necessary tool from the list.

Use the same modal window to customize the parameters of the selected Table or Widget:

Press the Insert Search Form button to add the Search Form Shortcode. A modal window with fields for specifying the city of departure and the city of arrival will open.

Please, keep in mind that these settings have a higher priority than those specified for Tables, Widgets, and Search Forms in the appropriate Plugin settings.

Press the Create button once you select the necessary tool and fill out all the fields. A Shortcode for Table, Widget, or Search Form will be displayed on the page.

Attention! You can change the city of origin and destination directly into the short code. To do this, use the IATA of city or airport.

After the page is published an appropriate tool will appear on it.

Shortcodes

List of all shortcodes used in the plugin:

  • [tp_price_calendar_month_shortcodes origin = MOW destination = SIP title = ""] - the table "Flights from origin to destination, One Way (next month)";
  • [tp_price_calendar_week_shortcodes origin = MOW destination = SIP title = ""] - the table "Flights from Origin to Destination (next few days)";
  • [tp_cheapest_flights_shortcodes origin = MOW destination = SIP title = ""] - the table "Cheapest Flights from origin to destination, Round-trip";
  • [tp_cheapest_ticket_each_day_month_shortcodes origin = MOW destination = SIP title = ""] - the table "Cheapest Flights from origin to destination (next month)";
  • [tp_cheapest_tickets_each_month_shortcodes origin = MOW destination = SIP title = ""] - the table "Cheapest Flights from origin to destination (next year)";
  • [tp_direct_flights_route_shortcodes origin = MOW destination = SIP title = ""] - the table "Direct Flights from origin to destination";
  • [tp_direct_flights_shortcodes origin = MOW title = "" limit = 10] - the table "Direct Flights from origin";
  • [tp_popular_destinations_airlines_shortcodes airline = SU title = "" limit =] - the table "Most popular flights within this Airlines";
  • [tp_our_site_search_shortcodes title = "" limit = 100] - the table "Searched on our website";
  • [tp_from_our_city_fly_shortcodes origin = MOW title = "" limit = 100] - the table "Cheap Flights from origin";
  • [tp_in_our_city_fly_shortcodes destination = AMS title = "" limit = 100] - the table "Cheap Flights to destination";
  • [tp_map_widget origin = MOW width = 500 height = 500] - map widget;
  • [tp_hotelmap_widget coordinates = "55.752041, 37.617508" width = 500 height = 500] - hotels Map Widget;
  • [tp_calendar_widget origin = MOW destination = LED responsive = true] - calendar widget;
  • [tp_hotel_widget hotel_id = 3056 hotels responsive = true] - hotel widget;
  • [tp_popular_routes_widget destination = MOW responsive = true] - popular Destinations Widget;
  • [tp_search_shortcodes id = 1 origin = "MOW" destination = "LED"] - search form.


The shortcode using the following parameters:

  • origin - IATA code for the point of departure;
  • destination - IATA code of the destination;
  • title - the title of the table;
  • limit - a limit on the number of rows displayed in the table;
  • width - the width of the widget;
  • height - the height of the widget;
  • coordinates - the coordinates of the hotel;
  • responsive - to make the widget exercising responsive (automatically adjusts to the screen resolution).

Attention! Options shortcodes are individual. They can work in a one shortcode and don't work in another. Watch carefully the contents of the shortcode in the list above.

 

Reports

All reports of your Affiliate Program activities are gathered in your Dashboard. We have also duplicated this information in Statistics section in order to make its use more convenient.

The section contains all information on your income and payouts.

Refer to Statistics and Reports article in order to get more detailed information about Reports.

Have more questions? Submit a request