- ステータス
- 開発者により解決済み
- 関連するプラグイン/テーマ
- 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);