Người dùng này không có chủ đề yêu thích nào.
Chủ đề diễn đàn yêu thích
Chủ đề diễn đàn đã tạo
Trạng thái |
Chủ đề
|
Người hỗ trợ | Số người tham gia | Bài viết | Độ mới |
---|---|---|---|---|---|
WP Query post from one language on another
Được bắt đầu bởi: jackc-12
trong: English Support
Problem: wpml_switch_language function within a filter to list posts from the default language on a page translated to another language, and can't get the wpml_switch_language to work. Solution: wpml_switch_language action hook must be used with the pre_get_posts WordPress hook. This means that you should integrate the language switch into the query modification process. Here's how you can do it: 1. Use the pre_get_posts hook to modify the query before it runs. do_action('wpml_switch_language', 'all') to switch the language. For more details and usage examples, you can refer to the following documentation: Additionally, there are alternative approaches you can consider, such as: |
|
2 | 2 | 1 years, 7 months trước | |
Homepage translations not in sitemap
Được bắt đầu bởi: jackc-12 trong: English Support |
|
2 | 2 | 1 years, 9 months trước | |
Migrating from Polylan
Được bắt đầu bởi: jackc-12 trong: English Support |
2 | 2 | 1 years, 9 months trước |