Skip to content

Blocks and Elementor widgets ​

Plan: Free. The trip-section blocks, Trip Search, Trip Deals, Customer Login, My Account, the block patterns and the Elementor widgets are new in Yatra 3.2.

Yatra adds 16 blocks to the WordPress block editor and, when Elementor is active, 13 widgets to Elementor. You can build a full trip landing page, a search hero or a deals section without shortcodes.

Blocks for the block editor ​

To add a Yatra block: in the editor, click the + button and search for Yatra, or open the Yatra category in the block inserter.

Listing and site blocks ​

BlockWhat it showsMain settings
TripA grid of trips, with filters and pagination. Same as [yatra_trip].Title, number of trips, columns, order, featured priority, destinations, activities, categories, difficulty levels, price and duration range, search, card layout, pagination
DestinationDestination cards. Same as [yatra_destination].Destinations, columns, number, featured only, hide empty, trip count, description, image, pagination
ActivityActivity cards. Same as [yatra_activity].Activities, columns, number, hide empty, trip count, description, image, pagination
Trip categoriesTrip category cards. Same as [yatra_trip_category].Categories, columns, number, featured only, hide empty, trip count, description, image, pagination
Trip SearchThe trip search bar.Show or hide each field: keyword, destination, activities, duration, budget, date
Trip DealsA grid of discounted trips and special offers.Number of trips, columns, order, card layout
Customer LoginThe customer login and registration form.Title, subtitle, show register link, show forgot-password link, remember me, redirect URL
My AccountThe customer dashboard: bookings, profile and wishlist. Guests see a login prompt.—

Trip-section blocks ​

These show one part of a trip, so you can lay out a trip page your own way:

BlockWhat it shows
Trip GalleryThe trip's photo gallery, with the full-screen viewer.
Trip FactsDuration, difficulty, group size, rating and other key facts. Option: show trip attributes.
Trip Booking CardPrice, departure date, travellers and the Check availability button.
Trip ItineraryThe day-by-day itinerary.
Trip Includes & ExcludesWhat the price includes and excludes.
Trip FAQThe trip's frequently asked questions.
Trip MapThe starting point and itinerary route on a map.
Trip ReviewsThe rating summary, reviews and review form.

Which trip they show. Each trip-section block has a Trip setting:

  • Pick a trip to show that trip on any page — a landing page, a campaign page, the home page.
  • Leave it empty to follow the trip page the block is on. On a page that isn't a trip page, editors see the note "Choose a trip in the block settings"; visitors see nothing.

If the chosen trip is unpublished or deleted, editors see a note and visitors see nothing.

Block patterns ​

Three ready-made layouts are in the Yatra pattern category (in the inserter, open Patterns → Yatra):

PatternWhat it contains
Trip landing pageGallery, facts, itinerary, inclusions, map, FAQ, booking card and reviews for one trip.
Destination hero + trip gridA full-width hero with the trip search bar, followed by a grid of trips.
Deals sectionA heading and a grid of discounted trips.

Insert a pattern, then pick the trip (or adjust the filters) in each block's settings.

Block themes ​

Block themes also get a Yatra Page Content block that renders the current Yatra page (trip, listing, booking, account) inside a Site Editor template. See Blocks & page builders.

Elementor widgets ​

When Elementor is active, Yatra adds 13 widgets in a Yatra category of the Elementor panel. They print exactly the same markup as the matching blocks, so they look the same.

Elementor widgetSame as block
Trip SearchTrip Search
Trip GridTrip
Trip DealsTrip Deals
Trip GalleryTrip Gallery
Trip FactsTrip Facts
Trip Booking CardTrip Booking Card
Trip ItineraryTrip Itinerary
Trip Includes & ExcludesTrip Includes & Excludes
Trip FAQTrip FAQ
Trip MapTrip Map
Trip ReviewsTrip Reviews
Customer LoginCustomer Login
My AccountMy Account

There are no Elementor widgets for the Destination, Activity or Trip categories grids — use Elementor's Shortcode widget with [yatra_destination], [yatra_activity] or [yatra_trip_category] (see Shortcodes).

The widgets load only when Elementor is active. The trip-section widgets work like the blocks: pick a trip, or leave it empty to follow the trip page they're on.

Styles and scripts ​

Yatra loads its CSS and JavaScript only on pages that show Yatra content. A page with a Yatra block or Elementor widget in its content is detected automatically. See FAQs → Why don't Yatra's styles load on a page? if a block in a widget area or a page-builder header looks unstyled.