Người dùng này không có chủ đề yêu thích.
Chủ đề diễn đàn yêu thích
Chủ đề diễn đàn đã được tạo
Trạng thái |
Đề tài
|
Người ủng hộ | Tiếng nói | Bài viết | Độ tươi |
---|---|---|---|---|---|
WooCommerce
Bắt đầu bởi: philippeB-68 tRONG: English Support |
0 | 7 | 6 days, 11 hours trước | ||
Updating the content on a page in the primary language
Bắt đầu bởi: philippeB-68 tRONG: English Support |
0 | 3 | 1 weeks trước | ||
Optimize SEO for German Formal language
Bắt đầu bởi: philippeB-68
tRONG: English Support
Problem: The client installed WordPress in German (Sie) and then WPML, which switched to German (Du). In the meta tags, 'german-formal' appears, which the client believes is not good for SEO. They need to tag the website as being in German while using formal German with WPML. Solution: We recommend adding a function to the theme's child functions.php file to modify the HTML language attribute for German. Here is the code you should use: add_filter('language_attributes', 'modify_language_attributes_for_german'); function modify_language_attributes_for_german($lang) { // Check if the current language is German $my_current_lang = apply_filters( 'wpml_current_language', NULL ); if ($my_current_lang === 'de') { // Replace the language code for German return 'lang="de-DE"'; } return $lang; // Keep default language attributes for other languages } If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum. |
0 | 5 | 1 weeks trước |