- Trạng thái
- Đang mở
- Plugin/giao diện liên quan
- Rank Math SEO
- Thẻ chủ đề
- Compatibility
Tổng quan về lỗi
Khi sử dụng Rank Math SEO với WPML, nội dung của shortcode rich snippet của Rank Math [rank_math_rich_snippet id="..."] sẽ không được dịch.
Giải pháp tạm thời
Bước 1: Làm cho các trường có thể dịch
- Đi tới “WPML > Cài đặt > Cấu hình XML tùy chỉnh”.
- Thêm đoạn sau và nhấp vào “Lưu”.
<wpml-config> <custom-fields> <custom-field action="translate">rank_math_schema_HowTo</custom-field> <custom-field action="translate">rank_math_schema_Article</custom-field> <custom-field action="translate">rank_math_schema_SoftwareApplication</custom-field> </custom-fields> <custom-fields-texts> <key name="rank_math_schema_HowTo"> <key name="name" /> <key name="description" /> </key> <key name="rank_math_schema_SoftwareApplication"> <key name="headline" /> <key name="description" /> <key name="review"> <key name="negativeNotes"> <key name="itemListElement"> <key name="*"> <key name="name" /> </key> </key> </key> <key name="positiveNotes"> <key name="itemListElement"> <key name="*"> <key name="name" /> </key> </key> </key> </key> </key> <key name="rank_math_schema_Article"> <key name="headline" /> <key name="description" /> </key> </custom-fields-texts> </wpml-config> - Thực hiện một sửa đổi nhỏ trên trang gốc và lưu lại.
- Dịch trang.
Bước 2: Điều chỉnh shortcode hoặc sử dụng khối Rank Math
- Shortcode
[rank_math_rich_snippet id="..."]bao gồm một ID duy nhất. - Thay vào đó, hãy sử dụng shortcode
[rank_math_rich_snippet](không có thuộc tính id). - Hoặc sử dụng khối Schema by RankMath.