View Categories

Trips Shortcode

1 min read

The [TRIPZZY_TRIPS] shortcode allows you to display a list of trips on your WordPress site. You can customize its output using various attributes.

Available Attributes #

Below are the available attributes along with their default values:

AttributeDefault ValueSinceDescription
orderbytitle1.1.6Specifies the field by which the trips should be ordered (e.g., title, date).
orderasc1.1.6Defines the order direction (asc for ascending, desc for descending).
posts_per_page31.1.6The number of trips to display per page.
featuredfalse1.1.6Whether to display only featured trips (true or false).
trip_destination1.1.6Filter trips by a specific destination (provide the destination slug).
trip_type1.1.6Filter trips by trip type (provide the trip type slug).
view_modegrid1.1.6Defines how the trips are displayed (grid or list).

Usage Examples #

Example 1: Display Default Trips #

[TRIPZZY_TRIPS]

This will display the latest 3 trips in a grid format, ordered by title in ascending order.

Example 2: Display 6 Trips in List View #

[TRIPZZY_TRIPS posts_per_page="6" view_mode="list"]

This will display 6 trips in a list format.

Example 3: Show Featured Trips Only #

[TRIPZZY_TRIPS featured="true"]

This will show only featured trips.

Example 4: Filter Trips by Destination #

[TRIPZZY_TRIPS trip_destination="europe"]

This will display trips that have “Europe” as their destination.

Notes #

  • Ensure that trip destinations and trip types are specified using their slugs.
  • The featured attribute accepts boolean values (true or false).

This shortcode is a powerful way to dynamically showcase trips on your website while keeping customization options flexible.

Scroll to Top