Este usuário não tem tópicos favoritos.
Tópicos favoritos do fórum
Tópicos de fórum criados
Status |
Tópico
|
Apoiador | Vozes | Posts | Frescor |
---|---|---|---|---|---|
Does WPML manipulate the post_parent value for posts?
Iniciado por: christopherA-19
em: 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 meses, 1 semana atrás | ||
How do I stop page slugs from being translated?
Iniciado por: christopherA-19
em: 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 meses, 1 semana atrás | ||
how can you programmatically figure out if a page has more than one translation
Iniciado por: christopherA-19 em: Chat Support |
1 | 2 |
11 meses, 2 semanas atrás
|
||
Get the default language post id using secondary language post
Iniciado por: christopherA-19 em: Chat Support |
1 | 2 |
11 meses, 2 semanas atrás
|
||
wpml-config.xml is not picked up by WPML
Iniciado por: christopherA-19 em: Chat Support |
1 | 2 |
11 meses, 2 semanas atrás
|
||
Redirections to language translations don't work
Iniciado por: christopherA-19
em: 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 meses, 3 semanas atrás |