- Stato
- Risolto dall’autore
- Plugin/tema correlato
- Houzez
- Tag dell’argomento
- Compatibility
Panoramica del problema
Quando usi il tema Houzez con WPML, potresti riscontrare un problema per cui le statistiche dell’agente (ad es. statistiche, recensioni, annunci) non vengono visualizzate nelle pagine tradotte degli agenti.
Soluzione alternativa
Assicurati di avere un backup completo del sito prima di procedere.
- Apri il file …/wp-content/themes/houzez/template-parts/realtors/agent/single-agent-v1.php.
- Cerca la riga 70.
- Sostituisci:
if( houzez_option('agent_stats', 0) != 0 ) { $agent_listing_ids = Houzez_Query::get_agent_properties_ids_by_agent_id(get_the_ID()); }
- Con:
if( houzez_option('agent_stats', 0) != 0 ) { $default_lang_agent_id = apply_filters( 'wpml_object_id', get_the_ID(), 'houzez_agent', false, wpml_get_default_language() ); $agent_listing_ids = Houzez_Query::get_agent_properties_ids_by_agent_id($default_lang_agent_id);}
- Poi apri il file …/wp-content/themes/houzez/framework/functions/stats.php.
- Sostituisci:
$count = houzez_realtor_stats($taxonomy_name, $meta_key, get_the_ID(), $slug); - Con:
$default_lang_agent_id = apply_filters( 'wpml_object_id', get_the_ID(), 'houzez_agent', false, wpml_get_default_language() ); $count = houzez_realtor_stats($taxonomy_name, $meta_key, $default_lang_agent_id, $slug);