このユーザーにはお気に入りのトピックがありません。
お気に入りのフォーラムトピック
作成したフォーラムトピック
ステータス |
トピック
|
サポーター | 声 | 投稿 | 新着順 |
---|---|---|---|---|---|
WP Query post from one language on another
開始者: jackc-12
カテゴリ: 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年、 7ヶ月前 | |
Homepage translations not in sitemap
開始者: jackc-12 カテゴリ: English Support |
|
2 | 2 | 1年、 9ヶ月前 | |
Migrating from Polylan
開始者: jackc-12 カテゴリ: English Support |
2 | 2 | 1年、 9ヶ月前 |