Changing front-end labels

Many labels and headers displayed on the front-end with FiboFilters might be changed, overridden, or translated. You can manipulate filter names, filter values, button labels such as “Show more products”, and “All filters” among others. Below, you can find information on how to modify such content to further customize the filters to suit your use case.

Changing filter names

A filter title
A filter title

When you add a new filter using our Filter Creator in WooCommerceFiboFiltersFilters, the filter’s name is automatically generated to match the data source. For example, Categories, Stock status, Price, and so on.

The name of the filter can be easily changed. You can display a different filter name on the front-end instead of the one generated initially. To do so, Click the “pencil” iconEdit the filter nameSave the settings.

Changing filter name
A place where you can change the filter name.

Changing filter values

Filter values
Filter values

Filter values are fetched from the data sources.

For example, the values of the “Categories” filter will be fetched from the product_cat taxonomy (for example, “Shirts”, “Boots”, and so on). Accordingly, the values for the “Size” filter will be fetched from the terminology of the “Size” attribute (for example, “39”, “40”, and so on). During the indexing process, these values are stored in the database, in the fibofilters_valuelist_main table.

Note:
If you need to change the filter values, the best way is to edit them directly at the source. To do so, edit the category or attribute name directly in WooCommerce.

You can also override these values with a PHP filter. Below are a few examples of how to change values for the “Stock status” and “On sale” filters.

How to change the values for the “Stock status” filter:

Changed stock status labels
Changed “Stock status” labels
add_filter( 'fibofilters/indexer/filters_source_query/value_label', function ( $label, $value, $source_name ) {
	if ( $source_name === 'cf__stock_status' ) {

		switch ($value){
			case 'instock':
				$label = 'Immediate shipping';
				break;
			case 'outofstock':
				$label = 'Temporarily unavailable';
				break;
			case 'onbackorder':
				$label = 'Special order';
				break;
		}
	}

	return $label;
}, 10, 3 );

Compare the example for changing the values of the “On sale” filter:

Changed on sale labels
Changed the filter name and the filter value for the “On sale” filter
add_filter( 'fibofilters/indexer/filters_source_query/value_label', function ( $label, $value, $source_name ) {
	if ( $source_name === 'on_sale' ) {

		$label = 'Special price!';
	}

	return $label;
}, 10, 3 );

After adding the above snippets, you need to go to WooCommerce →  FiboFiltersIndexer →  Rebuild the index.

Translations

FiboFiltes has almost 30 translatable labels (i18n) that can be displayed on the front-end.

As of now (mid-2024), these texts have been translated into 15 languages:

  • Czech
  • Danish
  • Dutch
  • English
  • French
  • German
  • Greek
  • Italian
  • Lithuanian
  • Norwegian
  • Polish
  • Portuguese
  • Spanish
  • Swedish
  • Turkish

Additionally, you can add your own translation if a language you need for your store is not yet supported.  Loco Translate is a popular plugin for this purpose.

We encourage you to send these translations our way. Please format them as .po files. We’ll add them along with incoming revisions, so all FiboFilters customers can make use of them.