Travelpayouts Wordpress Plugin

Plugin Description

The 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 about 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.

While developing the plugin, we tried to simplify the installation of widgets, tables, and search forms. This step-by-step manual provides detailed instructions for setting up the Travelpayouts plugin.

Technical requirements

To work correctly, the plugin requires PHP version 5.3 or higher. We also recommend using the current version of WordPress. This is important so that the plugin works correctly in terms of security and the speed of your site.

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

Tip №1: To know a version of PHP, you can use one of two methods - installing a special plug-in or writing a letter to hosting support staff.

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

The second method - write a letter to hosting support staff:

"Hello. Can you please tell me which version of PHP is installed on the host for site".

If you find that a version of PHP below 5.3 is installed, write a letter to hosting support:

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

Tip №2: In the letter, also ask to set the memory limit at 128 MB or 256 MB.

The hosting provider can refuse, but if your request is accepted it will be useful to your site (if your limit was less than that before).

Plugin Installation

The Travelpayouts plugin is installed as a regular WP plugin:

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

Once the plugin is activated, you will need 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. See the next section for more detailed information about this issue.

The plugin will issue a reminder in the form of an alert message:

Basic Plugin Settings

To configure the plugin, click on Set details and enable plugin features. The page will open with a form where you can enter the partner token and marker.


If you are registered with the Travelpayouts travel affiliate program, follow the instructions below. If you don't have an account with the affiliate program, click Travelpayouts. 

After registration, return to the configuration page and fill out Token and Marker.

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

Additional Marker is an optional field Extra marker with the “Wpplugin” value set as a default. This marker lets you track all the bookings made via plugin. Get more detailed information about Additional Marker here.

The White Label field is optional. You must configure White Label option and enter its address in this field if you want your visitors to browse search results on your website subdomain without redirecting them to our service. A White Label address example is: “”.

Additional Plugin Settings

You can start using the Travelpayouts plugin immediately 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 – 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...
  • Buttons in the editor - size of buttons.
  • Redirect – a 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.
  • Turn off statistics and blog updates - turn off statistics and blog updates if you get any errors.
  • Use plugin's scripts on all pages - check if you want then tables work in the sidebar, in comments block and ets.
  • Cache Timeout – time the data is stored in the databapressingse. Cached data is loaded faster.
    • Day;
    • Hour.
  • Script Include – a place to include the script of the plugin.
    • Header – website header. The script will be loaded first, before the website content.
    • Footer – script will be loaded after all website content is loaded. Widgets and tables can be loaded with a delay in this case.
  • Date Format – all WordPress standard date formats are supported.
  • Event tracking. "Find" button - the key of event for Google Analytics.
  • Event tracking. Table is loaded - the key of event for Google Analytics.
  • Settings Import – import of previously exported settings.
  • Export – export of current settings to a file.


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).
  • Host - the host where search result will open (if you don't use White Label).
  • Field Names – allows for the changing of field names in the tables.


Table Settings

You can start using tables in your posts immediately after plugin installation. If you need to customize the table properties, go to the 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.


Table 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 income for you.
  • Destination – city of arrival.
  • Button Text – text to be displayed on the button in the table. A price variable can be used to add the price to the button text.
  • Limit – max number of strings to display.
  • Number of stops – 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. If the number of table entries exceeds the specified rows number, pagination will be applied (you should check 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 the default.
  • Title – table title. Use the Airline variable 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.


To configure the design of table, go to Layout.


In the settings, you can:

  • change header style;
  • change content;
  • change borders;
  • change background;
  • change table header background;
  • change 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 responsive WP theme), tables won't affect your design, but will have a horizontal scroll.

Widget Settings

You can start using widgets in your posts immediately after the plugin installation. If you must customize the Widget properties, go to the 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 only one-way flights.
  • Draggable – check to make the map draggable.
  • Select Color – map style customization.
  • Additional Marker – use Additional Marker to track clicks in a widget.
  • Destination – specify the city of arrival.
  • Disable Zoom – apply a 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 the Aviasales logo from the widget.
  • Direct Flights Only – check to display only flights with no stops.
  • Scroll Wheel Zoom – check to enable mouse scroll zoom on an embedded map.
  • Width (px) – widget width.

Search Forms

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

Go to the 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 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, located above the WP Text Editor, to insert a widget, table, or search form into your website’s page or post:

A modal window will open upon the addition of 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 will open with fields to specify the city of departure and the city of arrival.

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 in the short code. To do this, use the IATA of the city or airport.

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


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 of the point of departure;
  • destination - IATA code of the destination;
  • title - title of the table;
  • limit - limit on the number of rows displayed in the table;
  • width - width of the widget;
  • height - height of the widget;
  • coordinates - 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 for one shortcode and not for another. Carefully watch the contents of the shortcode in the list above. 


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

The section contains all the information about your income and payouts.

Refer to the Statistics and Reports article for more detailed information about reports.

Was this article helpful?

Have more questions? Submit a request