• How to Set up?
  • How to add any field in to search?
  • How to remove default fields?
  • Translate fields/texts on search.
    • How to translate options New Model/Used Model?

How to Set up?

The widget can be placed two ways mainly.

  1. Header Navigation
  2. Sidebar

If you want to set up the search widget in to Header navigation then place the widget in to “Header Search Area”. Do not specify “Title” in the widget for this area.

To have search in sidebar too, you can place the widget in to any sidebar like Add Vehicle Sidebar, Vehicle Detail Sidebar, etc…

How to add any field in to search?

To add any additional field in to search rather than default fields, Add/edit the custom fields from Tevolution -> Custom Fields. Select “Yes” in “Show in search form?” option and “Both” in “Display Location” option.

How to remove default fields?

To remove any field from the widget, you will need to edit the coding file of the search widget. Search Car widget’s coding is placed in to the file named “widget_functions.php” located at your “Themes/Automotive/Functions” folder. The coding starts at around line number 700.

Following are the fields listed you can remove and explained how you can remove them.

  1. Model, Name etc…: Find this code section. Replace with this one.
  2. All Makes: Remove this code section.
  3. All Models: Remove this code section.
  4. All Type: Remove this code section.
  5. Max. Price: Remove this code section.
  6. Min. Price: Remove this code section.

NOTE: Article written in theme version 1.0.6. The coding or reference line numbers can be different then the present files.

Translate fields/texts on search.

To rename the fields also you can look in to the same above coding files. The strings are included in the coding in _e function like shown below.

The different strings available for translation are:

  • placeholder=”<?php _e(‘Model , Name etc…‘,T_DOMAIN); ?>”
  • _e(‘OR‘,T_DOMAIN);
  • _e(‘All Type‘,T_DOMAIN);
  • _e(“All Makes“,T_DOMAIN);
  • _e(‘All Models‘,T_DOMAIN);
  • _e(‘Max. Price..‘,T_DOMAIN);
  • _e(‘Min. Price..‘,T_DOMAIN);
  •  _e(‘Find Car‘,T_DOMAIN);

For example, to translate the “Find Car” the whole coding line will be like this:

<input type=”submit” name=”submit” value=”<?php _e(‘Find Car’,T_DOMAIN); ?>” onclick=”find_car_click();” />

The same way there will be a different coding line for each text in which the texts will be given.

You can also use poEdit tool/WPML if you are having so many other strings too to translate with the above strings or if you do not want to edit the coding files.

The other strings mostly will be available in to the WordPress backend settings. If it is a field, then you can translate it by editing the custom field.

  • How to translate options New Model/Used Model?

Go to your WP-admin -> Tevolution -> Custom Fields. Edit the field named as “Model Status”. Give the new options texts in to the field named as “Option Title”. Do not do anything in to “Option values” field.

Click here for more info.

 

Thank you!