How change order of the tabs In style 7 ?

Closed
Travelo - Travel/Tour/Car Rental/Cruise Booking WordPress Theme Travelo - Travel/Tour/Car Rental/Cruise Booking WordPress Theme February 15, 2019
Login to reply
Kelly R Support Agent
5 years ago
Resolved.
Jesus sanchez
5 years ago

Solved ,thanks a lot

Kelly R Support Agent
5 years ago

Hi,

You can find following code in shortcode_search_group function.

$all_features = array( 'acc', 'tour', 'car', 'cruise', 'flight' );

Please replace with following code.

$all_features = array( 'tour', 'acc', 'car', 'cruise', 'flight' );

Regards, C-Themes

Jesus sanchez
5 years ago

Hi Kelly , have a nicer day...

That made change the order , but dont make it the default search tab  , see screenshot.. the arrow and the search form have to be from the Tour

Kelly R Support Agent
5 years ago

Hi,

You can find shortcode_search_group function in /inc/functions/shortcode/shortcodes.php file.

In this function, please find following codes.

<?php if ( count( $enabled_features ) > 1 ) : ?>

     <ul class="search-tabs clearfix">
      <?php if ( in_array( 'acc', $enabled_features ) ) : ?>
       <li <?php if ( $enabled_features[0] == 'acc' ) echo 'class="active"' ?> ><a href="#hotels-tab" data-toggle="tab"><i class="soap-icon-hotel"></i> <span><?php _e( 'HOTELS', 'trav' ) ?></span></a></li>
      <?php endif; ?>
      <?php if ( in_array( 'tour', $enabled_features ) ) : ?>
       <li <?php if ( $enabled_features[0] == 'tour' ) echo 'class="active"' ?> ><a href="#tours-tab" data-toggle="tab"><i class="soap-icon-beach"></i> <span><?php _e( 'TOURS', 'trav' ) ?></span></a></li>
      <?php endif; ?>
      <?php if ( in_array( 'car', $enabled_features ) ) : ?>
       <li <?php if ( $enabled_features[0] == 'car' ) echo 'class="active"' ?> ><a href="#cars-tab" data-toggle="tab"><i class="soap-icon-car"></i> <span><?php _e( 'CARS', 'trav' ) ?></span></a></li>
      <?php endif; ?>
      <?php if ( in_array( 'cruise', $enabled_features ) ) : ?>
       <li <?php if ( $enabled_features[0] == 'cruise' ) echo 'class="active"' ?> ><a href="#cruises-tab" data-toggle="tab"><i class="soap-icon-cruise"></i> <span><?php _e( 'CRUISE', 'trav' ) ?></span></a></li>
      <?php endif; ?>
      <?php if ( in_array( 'flight', $enabled_features ) ) : ?>
       <li <?php if ( $enabled_features[0] == 'flight' ) echo 'class="active"' ?> ><a href="#flights-tab" data-toggle="tab"><i class="soap-icon-plane"></i> <span><?php _e( 'FLIGHT', 'trav' ) ?></span></a></li>
      <?php endif; ?>
     </ul>
     <div class="visible-mobile">
     <ul id="mobile-search-tabs" class="search-tabs clearfix">
      <?php if ( in_array( 'acc', $enabled_features ) ) : ?>
       <li <?php if ( $enabled_features[0] == 'acc' ) echo 'class="active"' ?> ><a href="#hotels-tab" data-toggle="tab"><?php _e( 'HOTELS', 'trav' ) ?></a></li>
      <?php endif; ?>
      <?php if ( in_array( 'tour', $enabled_features ) ) : ?>
       <li <?php if ( $enabled_features[0] == 'tour' ) echo 'class="active"' ?> ><a href="#tours-tab" data-toggle="tab"><?php _e( 'TOURS', 'trav' ) ?></a></li>
      <?php endif; ?>
      <?php if ( in_array( 'car', $enabled_features ) ) : ?>
       <li <?php if ( $enabled_features[0] == 'car' ) echo 'class="active"' ?> ><a href="#cars-tab" data-toggle="tab"><?php _e( 'CARS', 'trav' ) ?></a></li>
      <?php endif; ?>
      <?php if ( in_array( 'cruise', $enabled_features ) ) : ?>
       <li <?php if ( $enabled_features[0] == 'cruise' ) echo 'class="active"' ?> ><a href="#cruises-tab" data-toggle="tab"><?php _e( 'CRUISES', 'trav' ) ?></a></li>
      <?php endif; ?>
      <?php if ( in_array( 'flight', $enabled_features ) ) : ?>
       <li <?php if ( $enabled_features[0] == 'flight' ) echo 'class="active"' ?> ><a href="#flights-tab" data-toggle="tab"><?php _e( 'FLIGHTS', 'trav' ) ?></a></li>
      <?php endif; ?>
     </ul>
    </div>
    <?php endif; ?>

And please replace with following.

<?php if ( count( $enabled_features ) > 1 ) : ?>

 <ul class="search-tabs clearfix">
  <?php if ( in_array( 'tour', $enabled_features ) ) : ?>
   <li <?php if ( $enabled_features[0] == 'tour' ) echo 'class="active"' ?> ><a href="#tours-tab" data-toggle="tab"><i class="soap-icon-beach"></i> <span><?php _e( 'TOURS', 'trav' ) ?></span></a></li>
  <?php endif; ?>
  <?php if ( in_array( 'acc', $enabled_features ) ) : ?>
   <li <?php if ( $enabled_features[0] == 'acc' ) echo 'class="active"' ?> ><a href="#hotels-tab" data-toggle="tab"><i class="soap-icon-hotel"></i> <span><?php _e( 'HOTELS', 'trav' ) ?></span></a></li>
  <?php endif; ?>
  <?php if ( in_array( 'car', $enabled_features ) ) : ?>
   <li <?php if ( $enabled_features[0] == 'car' ) echo 'class="active"' ?> ><a href="#cars-tab" data-toggle="tab"><i class="soap-icon-car"></i> <span><?php _e( 'CARS', 'trav' ) ?></span></a></li>
  <?php endif; ?>
  <?php if ( in_array( 'cruise', $enabled_features ) ) : ?>
   <li <?php if ( $enabled_features[0] == 'cruise' ) echo 'class="active"' ?> ><a href="#cruises-tab" data-toggle="tab"><i class="soap-icon-cruise"></i> <span><?php _e( 'CRUISE', 'trav' ) ?></span></a></li>
  <?php endif; ?>
  <?php if ( in_array( 'flight', $enabled_features ) ) : ?>
   <li <?php if ( $enabled_features[0] == 'flight' ) echo 'class="active"' ?> ><a href="#flights-tab" data-toggle="tab"><i class="soap-icon-plane"></i> <span><?php _e( 'FLIGHT', 'trav' ) ?></span></a></li>
  <?php endif; ?>
 </ul>
 <div class="visible-mobile">
 <ul id="mobile-search-tabs" class="search-tabs clearfix">
  <?php if ( in_array( 'tour', $enabled_features ) ) : ?>
   <li <?php if ( $enabled_features[0] == 'tour' ) echo 'class="active"' ?> ><a href="#tours-tab" data-toggle="tab"><?php _e( 'TOURS', 'trav' ) ?></a></li>
  <?php endif; ?>
  <?php if ( in_array( 'acc', $enabled_features ) ) : ?>
   <li <?php if ( $enabled_features[0] == 'acc' ) echo 'class="active"' ?> ><a href="#hotels-tab" data-toggle="tab"><?php _e( 'HOTELS', 'trav' ) ?></a></li>
  <?php endif; ?>
  <?php if ( in_array( 'car', $enabled_features ) ) : ?>
   <li <?php if ( $enabled_features[0] == 'car' ) echo 'class="active"' ?> ><a href="#cars-tab" data-toggle="tab"><?php _e( 'CARS', 'trav' ) ?></a></li>
  <?php endif; ?>
  <?php if ( in_array( 'cruise', $enabled_features ) ) : ?>
   <li <?php if ( $enabled_features[0] == 'cruise' ) echo 'class="active"' ?> ><a href="#cruises-tab" data-toggle="tab"><?php _e( 'CRUISES', 'trav' ) ?></a></li>
  <?php endif; ?>
  <?php if ( in_array( 'flight', $enabled_features ) ) : ?>
   <li <?php if ( $enabled_features[0] == 'flight' ) echo 'class="active"' ?> ><a href="#flights-tab" data-toggle="tab"><?php _e( 'FLIGHTS', 'trav' ) ?></a></li>
  <?php endif; ?>
 </ul>
</div>
<?php endif; ?>

Regards, C-Themes

Jesus sanchez
5 years ago


Jesus sanchez
5 years ago

I need to change the order of the tabs , making Tours see first ...