Search Documentation

WP Travel User Documentation

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

Plugin Shortcodes

WP Travel offers you several Shortcodes that can be used to display trips, trips according to taxonomy, category, Parent/Child category, and page shortcodes.

1. Display all Trips
2. Display Trips Alphabetically
3. Display the Featured trip
4. Display the trips according to the Trip Types
5. Display the trips according to the Destinations
6. Display the trips according to the Activities
7. Display the trips in ascending and descending order
8. Display Trip Category
9. Display Trip Types category
10. Display Keyword category
11. Display Activities category
12. For the different functions
13. Display the Parent/Child category of the destination
14. WP Travel Pages
15. Currency Exchange rate
16. Weather forecast
17. Shortcode of FAQs
18. Display Trip Types, Activities, Group Size, and Reviews

Display all Trips

[WP_TRAVEL_ITINERARIES]

Using this shortcode you can display the number of trips that you have created.

Note:  The default value of the limit is set to 20. But you can show more no of trips bypassing the limit parameter. 

Example:

[WP_TRAVEL_ITINERARIES limit=10]

Using this Shortcode you can limit the no. of the itinerary to 10 i.e you will be able to display ten trips at the front end

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

By default, trips will be displayed in the grid view. If you want to display trips in the list format then you can use the shortcode given below:

[WP_TRAVEL_ITINERARIES view_mode="list"]

Display Trips Alphabetically:

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

[WP_TRAVEL_ITINERARIES order="asc"]
[WP_TRAVEL_ITINERARIES order="desc"]
[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.

Display the trips according to the Trip Types

type=itinerary_types

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.

i. Using ID:

[WP_TRAVEL_ITINERARIES type=itinerary_types  id=18]

ii. Using Slug:

[WP_TRAVEL_ITINERARIES type=itinerary_types slug="trekking"]

Backend

Frontend:

Display the trips according to the Destinations

type=travel_locations

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.

i. Using ID:

[WP_TRAVEL_ITINERARIES type=travel_locations id=3 ]

ii. Using Slug :

[WP_TRAVEL_ITINERARIES type=travel_locations slug="america"]

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

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.

i. Based on slug:

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

ii. Based on ID:

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

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" ]

Display Trip Category:

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.

Display Trip Types category:

[WP_TRAVEL_TRIP_CATEGORY_ITEMS taxonomy="itinerary_types"]

Display Keyword category:

[WP_TRAVEL_TRIP_CATEGORY_ITEMS taxonomy="travel_keywords"]

Display Activities category:

[WP_TRAVEL_TRIP_CATEGORY_ITEMS taxonomy="activity"]

For the different functions:

To display the trips Category in ascending order :

[WP_TRAVEL_TRIP_CATEGORY_ITEMS order="asc"]

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"]

Display the Parent/Child category of the destination

With WP Travel version 5.3.6, we have added the shortcode with which you will be able to display the parent category or the child category of the destination you have added.

i. Shortcode for the Parent Category:

If you are willing to show only the parent category of the destination then you can use the below-given shortcodes:

[wp_travel_trip_category_items parent='yes']

ii. Shortcode for the Child Category:

If you are willing to show only the child category of the destination then you can use the below-given shortcodes:

[wp_travel_trip_category_items child='yes']

WP Travel Pages

i. Cart Page:

[wp_travel_cart]

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

ii. Checkout Page:

[wp_travel_checkout]

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

iii. Dashboard Page:

[wp_travel_user_account]

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

iv. Thank You Page:

[wp_travel_thankyou]

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

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…

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]

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?