Cet utilisateur n'a aucun sujet favori.
Sujets de forum favoris
Sujets de forum créés
Statut |
Sujet
|
Supporteur | Voix | Messages | Fraîcheur |
---|---|---|---|---|---|
WP Query post from one language on another
Commencé par : jackc-12
dans : 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 | Il y a 1 année et 7 mois | |
Homepage translations not in sitemap
Commencé par : jackc-12 dans : English Support |
|
2 | 2 | Il y a 1 année et 8 mois | |
Migrating from Polylan
Commencé par : jackc-12 dans : English Support |
2 | 2 | Il y a 1 année et 9 mois | ||
WPML chat support ticket by jackc-12 – 1671115780
Commencé par : jackc-12 dans : Chat Support |
|
1 | 2 |
Il y a 2 années et 6 mois
|