問題の概要
Soho Hotelテーマを使用する予約ページにアクセスすると、選択した言語ではなく、宿泊施設とゲストがすべての言語で表示されます。
回避策
作業を進める前に、必ずサイトの完全なバックアップを取得してください。
- /wp-content/plugins/sohohotel-booking/includes/functions/backend/general/shb-core-functions.phpファイルを開きます。
- 10行目を探します。
- 以下のスニペットを:
PHP
function shb_get_all_ids($post_type) { $ids = get_posts(array( 'fields' => 'ids', 'posts_per_page' => -1, 'post_type' => $post_type, 'orderby' => 'date', 'order' => 'ASC', )); return $ids; }
次のように置き換えます:
PHPfunction shb_get_all_ids($post_type) { $ids = get_posts(array( 'fields' => 'ids', 'posts_per_page' => -1, 'post_type' => $post_type, 'orderby' => 'date', 'order' => 'ASC', 'suppress_filters' => false, )); return $ids; }