This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is experiencing an issue with the Houzez theme where the property counter on the search results page is not working correctly. The counter is including properties from all languages, not just the current language, leading to incorrect counts displayed in the autocomplete search results.
Solution:
We have identified a problem in the Houzez theme code and are providing a hotfix. We also recommend contacting the theme author to ensure the fix is included in the next theme update. Here are the steps to apply the hotfix:
1. Open the file
wp-content/themes/houzez/framework/functions/property_functions.php
.
2. Before the line
foreach ( $data as $post ) {, add the following line:
$new_data = array();
3. After the code snippet:
if ($post_language !== $current_language) continue;
Add the following line:
$new_data[] = $post;
4. In the line that outputs the count:
echo '<span class="auto-complete-count"><i class="houzez-icon icon-pin mr-1"></i> ' . sizeof( $data ) . ' '.$houzez_local['listins_found'].'</span>';
Replace
$data
with
$new_data
so it becomes:
echo '<span class="auto-complete-count"><i class="houzez-icon icon-pin mr-1"></i> ' . sizeof( $new_data ) . ' '.$houzez_local['listins_found'].'</span>';
If this solution does not seem relevant to your issue, please open a new support ticket with us.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 17 replies, has 2 voices.
Last updated by 4 years, 7 months ago.
Assisted by: Dražen.