Waiting for author
Overview of the issue
When using the WPRentals theme with WPML, you might experience an issue where taxonomy terms on property pages appear in the wrong language. This occurs because the theme caches taxonomy data, causing terms to display in the last language where the cache was cleared.
Workaround
Please, make sure of having a full site backup of your site before proceeding.
- Open the …/wp-content/themes/wprentals/libs/taxonomy_functions/taxonomy_transients_functions.php file.
- Look for line 35.
- Replace:
// Create unique key based on taxonomy and args $args_hash = md5(serialize($args));
- With:
// Create unique key based on taxonomy and args $args_hash = md5(serialize($args)); // WPML Workaround for compsupp-8069 if ( class_exists('Sitepress') ) { $current_lang = apply_filters( 'wpml_current_language', NULL ); $args_hash .= '_' . $current_lang; }
This will append the current language code to the transient key, ensuring that each language has its own cached taxonomy terms.