このユーザーにはお気に入りのトピックがありません。
お気に入りのフォーラムトピック
作成したフォーラムトピック
| ステータス |
トピック
|
サポーター | 声 | 投稿 | 新着度 |
|---|---|---|---|---|---|
|
Custom Content Feed Block
開始者:Rich Staats
カテゴリ:English Support
Problem: wpml_object_id hook to ensure that the $post_id refers to the translated post in the currently active language. Here is how you can implement it: // will return the post ID in the current language for post ID 1 echo apply_filters( 'wpml_object_id', 1, 'post' ); // will return the category ID in the current language for category ID 4. If the translation is missing it will return the original (here: category ID 4) echo apply_filters( 'wpml_object_id', 4, 'category', TRUE ); // will return the German attachment ID for attachment ID 25. If the translation is missing it will return NULL echo apply_filters( 'wpml_object_id', 25, 'attachment', FALSE, 'de' ); Ensure that the post has an existing translation. For further guidance, refer to the wpml_object_id documentation and the full list of WPML hooks at WPML hooks reference. If this solution does not resolve your issue or seems outdated, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket for further assistance at WPML support forum. |
|
0 | 7 | 2週、 6日前 | |
|
The logo in our header disappears when switching a language
開始者:Rich Staats カテゴリ:English Support |
|
0 | 5 | 2週、 6日前 |