WPML

问题概述

访问使用 Soho Hotel 主题的预订页面时,住宿和客人会以所有语言显示,而不是所选的语言。

临时解决方法

在继续操作之前,请务必对您的站点进行完整备份。

  1. 打开 /wp-content/plugins/sohohotel-booking/includes/functions/backend/general/shb-core-functions.php 文件。
  2. 找到第 10 行。
  3. 将以下代码段:
    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;
    
    }

    替换为:

    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',
    		'suppress_filters' => false,
    	));
    
    	return $ids;
    
    }

所有已知问题

需要有关此问题的帮助?

提出支持问题,我们将与您一起调查。