Search Documentation

WP Travel User Documentation

  1. Home
  2. Docs
  3. WP Travel User Documentation
  4. Shortcode
  5. Plugin Shortcode

Plugin Shortcode

The Shortcode that you have to Add is

[WP_TRAVEL_ITINERARIES]

Note: The maximum no of itineraries that a plugin can display by default is 20. But you can show more no of trips by passing the limit parameter. 

[WP_TRAVEL_ITINERARIES limit=20]

You can add the Shortcode either in the page/post. With the addition of the shortcode, you will be able to view the itineraries in page/post, depending on where you have to use the shortcode.

There is two special feature that you can manage using Shortcode.

  • Limit the no of the itinerary to display.
  • Display the itinerary according to the type.
    1. featured
    2. itinerary_types
    3. travel_locations
    4. activity

Limit :

Using shortcode you can limit the no of the itinerary to display at the front end.

Eg :

[WP_TRAVEL_ITINERARIES limit=1]

Using this Shortcode you can limit the no. of the itinerary to 1 i.e you will be able to display only one itinerary at the front end.

Note: The default value of the limit is set to 20.

Type :

Basically, there are 3 different types according to which you can display the itinerary.

Shortcode to display the trips according to the featured trip.

type=featured

Eg :

[WP_TRAVEL_ITINERARIES type=featured]

If you include the featured type in the shortcode all the itinerary that is marked as featured is displayed at the front end.

Shortcode to display the trips according to the Trip Types

type=itinerary_types

  1. If you include the itinerary_types in the shortcode, you have had to enter the id or the slug of trip Type. Only then the itinerary associated with that trip type will be displayed at the front end.

Eg :

  • Using ID:
[WP_TRAVEL_ITINERARIES type=itinerary_types  id=18 ]
  • Using Slug :
[WP_TRAVEL_ITINERARIES type=itinerary_types slug="trekking" ]

Screenshot :

Backend

Frontend

Shortcode to display the trips according to the Destinations.

type=travel_locations

  1. If you include the travel_locations in the shortcode, you have had to enter the id or the slug of Locations. Only then the itinerary associated with that location will be displayed at the front end.

Eg :

  • Using ID:
[WP_TRAVEL_ITINERARIES type=travel_locations id=3 ]
  • Using Slug :
[WP_TRAVEL_ITINERARIES type=travel_locations slug="america" ]

Screenshot :

Backend

Frontend

Note: Not just ID but you can control the display using the Slug attribute.  i.e in place of ID, you can place “slug=” name for itinerary_types and travel_locations. 

If you wish to display a trip type of a certain location then you can do so by adding the shortcode as given below:

[WP_TRAVEL_ITINERARIES type=travel_locations slug="karnali"]

Shortcode to display the trips according to the activities.

type=activity

With the WP Travel version, 4.2.0,  we have added the shortcode using which you will be able to display the trips based on the activities assigned to that trip.

Based on slug:

[wp_travel_itineraries type="activity" slug="Activity"]

Based on ID:

[wp_travel_itineraries type="activity" id="12"]

Display single Trips on post/page.

If you want to display single trips only using the shortcode then you can do so by using the id of the trips.

For eg : You can paste the below-given shortcode :

[WP_TRAVEL_ITINERARIES itinerary_id=8852]

This shortcode will display the trip with id “8852” only.

Shortcode to display the trips in ascending and descending order.

With the WP Travel version 3.2.1, we have added the shortcode using which you will be able to display the trips in ascending and descending order.

[WP_TRAVEL_ITINERARIES orderby="trip_date" order="desc" ]
[WP_TRAVEL_ITINERARIES orderby="trip_date" order="asc" ]

Trip Category Shortcodes:

With WP Travel version 5.3.0, we have added the shortcode using which you will be able to display the trips under the trip category.

[WP_TRAVEL_TRIP_CATEGORY_ITEMS]

Note: By default trip will be displayed according to the destination category.

Shortcode to display trip according to Trip Types category:

[WP_TRAVEL_TRIP_CATEGORY_ITEMS taxonomy="itinerary_types"]

Shortcode to display trip according to keyword category:

[WP_TRAVEL_TRIP_CATEGORY_ITEMS taxonomy="travel_keywords"]

Shortcode to display trip according to Activities category:

[WP_TRAVEL_TRIP_CATEGORY_ITEMS taxonomy="activity"]

List of different shortcodes for the different functions:

To display the trips Category in ascending order :

[WP_TRAVEL_TRIP_CATEGORY_ITEMS order="acs"]

To display the trips Category in descending order:

[WP_TRAVEL_TRIP_CATEGORY_ITEMS order="desc"]

To hide the empty category:

[WP_TRAVEL_TRIP_CATEGORY_ITEMS hide_empty="true"]

To display the limited number of categories:

[WP_TRAVEL_TRIP_CATEGORY_ITEMS number="5"]

Pages Shortcodes

Cart page:

This is the shortcode for the cart page. It displays the cart content and interfaces for coupon codes and other cart bits and pieces.

[wp_travel_cart]

Checkout Page:

This shortcode is for the checkout page. The checkout shortcode displays the checkout content including the payment option.

[wp_travel_checkout]

Dashboard Page:

This shortcode for the dashboard. It shows the ‘my account’ section where the customer can view past orders, wishlist, booking detail, and update their information.

[wp_travel_user_account]

Thank You Page:

This shortcode is for the thank you page. This shortcode displays the thank you message along with the table for the booking detail.

[wp_travel_thankyou]

Currency Exchange rate:

Shortcode for displaying the table of the exchange rate.

[wp_travel_currency_exchange_rates]

Shortcode with parameter

[wp_travel_currency_exchange_rates currency_code="CURRENCY_CODE(S)"]

Currency code: USD, NPR, AED etc…

Trip Weather forecast:

Primary shortcode:

[wp_travel_trip_weather_forecast]

Shortcode with all-important attrs:

[wp_travel_trip_weather_forecast title="title" city="city_name" country="country_name" temp_unit="metric_or_imperial"]

Shortcode of FAQs:

[wp_travel_utils_global_faq]

Shortcodes to display Trip Types, Activities, Group Size, and Reviews:

With WP Travel version 5.3.4, we have added the shortcode with which you will be able to display Trip Types, Activities, Group Size, and Reviews in a different tab of the single Trip page.

Shortcode for the single Trip page:

These shortcodes can be used in different Tabs like Overview Tab, Trip Includes Tab, Trip Excludes Tab, and New Tab of the single trip.

[wptravel_trip_type]
[wptravel_activities]
[wptravel_group_size]
[wptravel_reviews]

Example:

Frontend View:

Shortcode for posts and pages:

These shortcodes can be used to display Trip Types, Activities, Group sizes, and Reviews in different posts and pages using the related trip id.

[wptravel_trip_type trip_id=601]
[wptravel_activities trip_id=601]
[wptravel_group_size trip_id=601]
[wptravel_reviews trip_id=601]

Example:

Frontend View:

Was this article helpful to you? Yes No

How can we help?