WPML
상태
개발자가 해결함
관련 플러그인/테마
Houzez
주제 태그
Compatibility

문제 개요

WPML과 함께 Houzez 테마를 사용할 때, 번역된 에이전트 페이지에 에이전트 통계(예: 통계, 리뷰, 매물)가 표시되지 않는 문제가 발생할 수 있습니다.

임시 해결 방법

진행하기 전에 사이트의 전체 사이트 백업을 완료했는지 확인하세요.


  • …/wp-content/themes/houzez/template-parts/realtors/agent/single-agent-v1.php 파일을 여세요.

  • 70번째 줄을 찾으세요.

  • 다음 코드를:
    if( houzez_option('agent_stats', 0) != 0 ) {
     $agent_listing_ids = Houzez_Query::get_agent_properties_ids_by_agent_id(get_the_ID());
    }
            


  • 다음과 같이 바꾸세요:
    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);}
            

  • 그런 다음 …/wp-content/themes/houzez/framework/functions/stats.php 파일을 여세요.
  • 다음 코드를:
    $count = houzez_realtor_stats($taxonomy_name, $meta_key, get_the_ID(), $slug);
            
  • 다음과 같이 바꾸세요:
    $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);
            

알려진 모든 문제 →