WP Travel offers a range of shortcodes to display trips based on various criteria, such as taxonomy, category, and parent/child relationships. This short guide will help you show Trips Associated with Multiple Taxonomies.

Taxonomies in WP Travel serve as an effective way to organize trips by attributes like Trip Type, Destinations, and Activities, making it easier for users to find relevant itineraries.

The WP Travel plugin now allows users to filter trips that belong to multiple taxonomies simultaneously using AND Logic. This feature ensures that only trips that meet all specified taxonomy criteria are displayed, resulting in more refined and targeted trip filtering options.

Example Shortcode:

To display trips that include both a specific Trip Type and Location, you can use the following shortcode:

[WP_TRAVEL_ITINERARIES type=itinerary_types,travel_locations trip_types=86 trip_location=12]

Parameters:

  • query_relation=AND: This ensures that trips must match both specified criteria (i.e., trip type and location).
  • type=itinerary_types,travel_locations: This specifies the taxonomies to filter by. In this example:
    • itinerary_types: Trip types (e.g., adventure, cultural, etc.).
    • travel_locations: Travel locations (e.g., destinations or countries).
  • trip_types=86: Filters trips to include only those with the trip type ID 86.
  • trip_location=12: Filters trips to include only those with the location ID 12.

How to Find the Taxonomy IDs:

  • To find the taxonomy term IDs (such as the trip type and location):
  • Find the IDs: You can see the term IDs in the URL of the page or by editing each term.
  • Navigate to Trips > Taxonomies in your WordPress admin panel.
  • Click on the specific taxonomy (e.g., Trip Types or Travel Locations).
Finding the taxonomy term ID on the URL of the page when editing.
Finding the taxonomy term ID when hovering on the edit button of the term.

If you need to display trips filtered by three taxonomies, you can use the following shortcode:

[WP_TRAVEL_ITINERARIES query_relation=AND type=itinerary_types,travel_locations,activities trip_types=86 trip_location=13 activity=16]

By using the query_relation=AND parameter and specifying the taxonomies and their corresponding IDs, you can create highly specific queries to display trips that match multiple taxonomies. This functionality helps users find more targeted trips based on attributes like trip type, location, and activity.

Conclusion

By following the above-mentioned steps you can easily show Trips Associated with Multiple Taxonomies.

Check WP Travel documentation to learn more about configurations, modules, payments, shortcodes, and the WP Travel Rest API.

Your feedback helps us improve. Please share your thoughts.

Need assistance? Contact our support team, join our Facebook community, and subscribe to our YouTube Channel for video tutorials. Thank you for choosing WP Travel.

Get WP Travel Pro