WPML
Status
Resolvido pelo autor
Plugin/tema relacionado
Houzez
Tags de tópico
Compatibility

Visão geral do problema

Ao usar o tema Houzez com o WPML, você pode encontrar um problema em que as estatísticas do corretor (ex.: estatísticas, avaliações, anúncios) não são exibidas nas páginas traduzidas do corretor.

Solução alternativa

Por favor, certifique-se de ter um backup completo do site antes de prosseguir.


  • Abra o arquivo …/wp-content/themes/houzez/template-parts/realtors/agent/single-agent-v1.php.

  • Procure a linha 70.

  • Substitua:
    if( houzez_option('agent_stats', 0) != 0 ) {
     $agent_listing_ids = Houzez_Query::get_agent_properties_ids_by_agent_id(get_the_ID());
    }
            


  • Por:
    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);}
            

  • Em seguida, abra o arquivo …/wp-content/themes/houzez/framework/functions/stats.php.
  • Substitua:
    $count = houzez_realtor_stats($taxonomy_name, $meta_key, get_the_ID(), $slug);
            
  • Por:
    $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);
            

Todos os problemas conhecidos →