| @@ -29,10 +29,17 @@ | ||
| 29 | 29 | $display_title = __('Featured Trips', 'yatra'); |
| 30 | 30 | } else { |
| 31 | 31 | $display_title = __('Our Trips', 'yatra'); |
| 32 | 32 | } |
| 33 | + | |
| 34 | +// Card layout: per-instance override (card_layout attr) falls back to the | |
| 35 | +// site-wide Design setting. Class goes on this wrapper so this listing's layout | |
| 36 | +// is independent of the global default and of other listings on the page. | |
| 37 | +$yatra_listing_layout_class = \Yatra\Providers\FrontendAssetsProvider::listingLayoutClasses( | |
| 38 | + \Yatra\Providers\FrontendAssetsProvider::resolveListingLayout((string) ($atts['card_layout'] ?? '')) | |
| 39 | +); | |
| 33 | 40 | ?> |
| 34 | -<div class="yatra-tour-shortcode" data-atts='<?php echo esc_attr(json_encode($atts)); ?>'> | |
| 41 | +<div class="yatra-tour-shortcode<?php echo $yatra_listing_layout_class ? ' ' . esc_attr($yatra_listing_layout_class) : ''; ?>" data-atts='<?php echo esc_attr(json_encode($atts)); ?>'> | |
| 35 | 42 | <div class="yatra-tour-header"> |
| 36 | 43 | <h2 class="yatra-tour-title"><?php echo esc_html($display_title); ?></h2> |
| 37 | 44 | <?php if (!empty($trip_items) && $total_found > 0) : ?> |
| 38 | 45 | <div class="yatra-tour-count"> |