The search displays several permanent labels like “See all products…”, “No results”, “SKU”, “Tags”. etc. Several of them can be changed in the plugin settings. We have come up with some hints on how you can change each of them.
Changing basic labels via the settings page
You can change the following labels via the settings page. To do so, go to WooCommerce
→ FiboSearch
. You will find these options under the Search bar and Autocomplete tabs.
- Placeholder
- Submit text
- More results
- No-results
Changing other labels via PHP
Changing the rest of the labels requires custom PHP snippets. You have to add the following code to your website:
Change SKU label
add_filter( 'dgwt/wcas/labels', function ( $labels ) { $labels['sku_label'] = 'ISBN:'; // Change label "SKU:" to "ISBN:" return $labels; } );
ⓘLearn how to add this snippet to your WordPress.
After applying this code, the SKU label should be replaced with the ISBN label.
Change other labels
Here is a list of all the keys of the labels you can change. Take a look at the “Change SKU label” headline. You can use this code for every label. Just change the key.
Key | Label |
tax_product_cat | Category |
tax_product_cat_plu | Categories |
tax_product_tag | Tag |
tax_product_tag_plu | Tags |
product_plu | Products |
post | Post |
post_plu | Posts |
page | Page |
page_plu | Pages |
post_type_{cpt-slug} | Custom post type name |
post_type_{cpt-slug}_plu | Custom post type name (plural) |
sku_label | SKU: |
in | in |
read_more | continue reading |
no_results | No results |
show_more | See all products… |
show_more_details | See all products… |
search_placeholder | Search for products… |
submit | Search |
tax_{taxonomy-name} | Custom taxonomy name |
tax_{taxonomy-name}_plu | Custom taxonomy name (plural) |
search_hist | Your search history |
search_hist_clear | Clear |