- 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
- Mở tệp này:
sitepress-multilingual-cms/inc/template-functions.php - Đ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(); } - Thay thế
return $sitepress->get_language_selector();bằngecho $sitepress->get_language_selector(); - Lưu tệp