The Custom Booking Count feature allows you to manually define the booking count displayed for specific trips instead of using the actual number of bookings. This is useful for showcasing booking activity on selected trips.

Enable the Custom Booking Count

First, enable the Custom Booking Count option from WP Travel β†’ Settings β†’ Trips β†’ Trip Settings.

WP Travel settings screen showing the Enable Custom Booking Count option highlighted

Once enabled, add the following code to the functions.php file of your child theme or use a code snippets plugin to avoid modifying your theme files directly.

add_filter( 'wp_travel_custom_trip_booking_count', function( $counts ) {
    return [
        27 => 10,
        13 => 15,
    ];
});

In the example above:

  • Trip ID 13 will display a booking count of 15.
  • Trip ID 27 will display a booking count of 10.

These custom values will override the actual booking counts and will be displayed on the trip page whenever the Custom Booking Count feature is enabled.

You can add as many trips as needed by following the same format. Each entry consists of:

  • Value (right side): The custom booking count to display for that trip.
  • Key (left side): The Trip ID of the trip.

These custom values override the actual booking counts and will be displayed on the trip page whenever the Custom Booking Count feature is enabled.

Learn More: How to View Trip ID in WP Travel?

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

Your feedback helps us improve. Feel free to share your thoughts!

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

You can also find us on Facebook, Instagram, LinkedIn, TikTok, and X. Thank you for choosing WP Travel.

If you are a WP Travel Free user thinking about upgrading to Pro, simply click on the banner below.

Get WP Travel Pro