WPML
Trạng thái
Đã giải quyết
Được báo cáo cho
WPML Multilingual CMS 3.2
Đã giải quyết trong
3.2.1

Tổng quan về lỗi

Thêm đoạn mã sau vào tệp footer.php:

do_action( 'wpml_add_language_selector' );

Đáng lẽ nó phải hiển thị bộ chuyển đổi ngôn ngữ, nhưng thay vào đó lại không có gì được hiển thị.

Giải pháp tạm thời

  1. Mở tệp này: sitepress-multilingual-cms/inc/template-functions.php
  2. Đi đến dòng 989: bạn sẽ thấy mã sau:
    function wpml_add_language_selector_filter() {
    	global $sitepress;
    
    	return $sitepress->get_language_selector();
    }
  3. Thay thế return $sitepress->get_language_selector(); bằng echo $sitepress->get_language_selector();
  4. Lưu tệp

Tất cả các lỗi đã ghi nhận →