هذا المستخدم ليس لديه مواضيع مفضلة.
مواضيع المنتدى المفضلة
تم إنشاء مواضيع المنتدى
الحالة |
عنوان
|
مؤيد، مشجع، داعم | أصوات | المقالات | نضارة |
---|---|---|---|---|---|
Does WPML manipulate the post_parent value for posts?
بدأ ب: christopherA-19
في: English Support
Problem: Solution: add_filter('wpml_pre_parse_query', function($q){ if (empty($q->get('wpml_do_not_adjust_name'))) { return $q; } $name = $q->get('name'); unset($q->query['name']); unset($q->query_vars['name']); add_filter('wpml_post_parse_query', function($q) use ($name){ $q->set('name', $name); return $q; }); return $q; }); 2. Then, in the WP_Query, pass wpml_do_not_adjust_name parameter as true, for example: $args = array( 'wpml_do_not_adjust_name' => true, 'post_type' => $post_types, 'post_parent' => 59, 'name' => 'child-page-b', 'no_found_rows' => true, // used to improve performance. 'update_post_meta_cache' => false, // used to improve performance. 'update_post_term_cache' => false, // used to improve performance. ); Please note that after making these adjustments, WPML will stop translating the slug to the secondary language, so it won't display the translated post in the second language. This is because you are passing the static slug in the query and do not want WPML to interfere with this. For queries in different languages, adjust the post_parent and name parameters to the translated versions of the parent and child pages, respectively. We have escalated the case, but there is no clear ETA for it to be added in a near future release. You can use the above-mentioned workaround for the time being. We also advise checking the WPML Hooks documentation for further customization. If this solution is irrelevant to your case, either because it's outdated or not applicable, 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 the issue persists, please open a new support ticket. |
2 | 13 | قبل 11 شهر، 1 أسبوع | ||
How do I stop page slugs from being translated?
بدأ ب: christopherA-19
في: English Support
Problem: If the 'Translate' option is selected, make a small change to the default language page, save it, and resend it for translation to create a new translation job. Please note that the solution provided might be outdated or not applicable to your case. If the issue persists, we recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket. |
2 | 5 | قبل 11 شهر، 1 أسبوع | ||
how can you programmatically figure out if a page has more than one translation
بدأ ب: christopherA-19 في: Chat Support |
1 | 2 |
قبل 11 شهر، أسبوعين
|
||
Get the default language post id using secondary language post
بدأ ب: christopherA-19 في: Chat Support |
1 | 2 |
قبل 11 شهر، أسبوعين
|
||
wpml-config.xml is not picked up by WPML
بدأ ب: christopherA-19 في: Chat Support |
1 | 2 |
قبل 11 شهر، أسبوعين
|
||
Redirections to language translations don't work
بدأ ب: christopherA-19
في: English Support
Problem: Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If you're still facing issues, we recommend opening a new support ticket. We also highly recommend checking related 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 required, please contact our support team. |
2 | 3 | قبل 11 شهر، 3 أسابيع |