# yatra/3.0.5/app/Shortcodes/TripShortcode.php

Yatra – Travel Booking &amp; Tour Operator Software, version 3.0.5. 64 lines.

- Page: https://pluginprobe.com/plugins/yatra/3.0.5/code/app/Shortcodes/TripShortcode.php
- Raw: https://pluginprobe.com/plugins/yatra/3.0.5/raw/app/Shortcodes/TripShortcode.php
- Modified: 2026-05-12T14:25:18+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/yatra/3.0.5/code/app/Shortcodes/TripShortcode.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace Yatra\Shortcodes;

/**
 * Trip Shortcode
 *
 * Displays trips with various filtering options using trip-listing-card.php template
 */
class TripShortcode extends BaseShortcode
{
    public function __construct()
    {
        parent::__construct('yatra_tour', [
            'order' => 'asc',
            'featured' => '0',
            'featured_priority' => '',
             'per_page' => '10',
            'category' => '',
            'destination' => '',
            'activity' => '',
            'difficulty' => '',
            'price_min' => '',
            'price_max' => '',
            'duration_min' => '',
            'duration_max' => '',
            'search' => '',
            'columns' => '3',
            'show_pagination' => 'yes',
            'title' => 'Our Trips'
        ]);
    }

    /**
     * Register the shortcode
     */
    public function register(): void
    {
        // Register both shortcode tags
        add_shortcode('yatra_tour', [$this, 'render']);
        add_shortcode('yatra_trip', [$this, 'render']);
    }

    /**
     * Render the trip shortcode content
     */
    protected function renderContent(array $atts): string
    {
        // Use the shared BlockDataService method
        return \Yatra\Services\BlockDataService::renderTrip($atts);
    }

    /**
     * Get trips using Yatra's service
     */
    public function getTrips(array $atts): array
    {
        return \Yatra\Services\BlockDataService::getTripListingForShortcode($atts);
    }

}

```
