How to change labels?

The search displays several permanent labels like “See all products…”, “No results”, “SKU”, “Tags”. etc. Several of them you can change in the plugin settings. We prepared hints on how you can change each of them.

Changing basic labels via the settings page

You can change the following labels via the setting page. To do it go to WooCommerce -> AJAX Search bar. You find these options under the Search bar and Autocomplte tab.

  1. Placeholder
  2. Submit text
  3. More results
  4. No-resutls

Changing other labels via PHP

Changing the rest of the labels requires custom PHP snippets. You have to paste the following code examples into functions.php in your child theme or use Code Snippets plugin.

Change SKU label

add_filter( 'dgwt/wcas/labels', function ( $labels ) {

	$labels['sku_label'] = 'ISBN:'; // Change label "SKU:" to "ISBN:"

	return $labels;
} );

After applying this code, the SKU label should be replaced with ISBN label.

Change other labels

Here all list of all keys of 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.

KeyLabel
categoryCategory
tagTag
brandBrand
postPost
pagePage
product_cat_pluCategories
product_tag_pluTags
product_pluProducts
brand_pluBrands
post_pluPosts
page_pluPages
sku_labelSKU:
inin
read_morecontinue reading
no_resultsNo results
show_moreSee all products…
show_more_detailsSee all products…
search_placeholderSearch for products…
submitSearch