Strings

This configuration contains an array of reusable HivePress strings. It's mainly used to avoid duplicating translations in the HivePress themes and extensions. You can get any of the available strings by the string name:

echo hivepress()->translator->get_string( 'listings' );

The code example below changes the "Listings" word in HivePress along with its themes and extensions. In the same way, you can change any of the available strings or add a new one by adding an array item.

add_filter(
	'hivepress/v1/strings',
	function( $strings ) {
		$strings['listings'] = 'Custom Text';

		return $strings;
	}
);

Last updated